Don't reassign owner in Spawn
This commit is contained in:
parent
4a0009365e
commit
e1e84d4465
|
@ -81,12 +81,9 @@ pub fn entrypoint(
|
|||
keyed_accounts[to].account.tokens += tokens;
|
||||
}
|
||||
SystemInstruction::Spawn => {
|
||||
if !keyed_accounts[from].account.executable
|
||||
|| keyed_accounts[from].account.owner != Pubkey::default()
|
||||
{
|
||||
if !keyed_accounts[from].account.executable {
|
||||
Err(ProgramError::AccountNotFinalized)?;
|
||||
}
|
||||
keyed_accounts[from].account.owner = *keyed_accounts[from].signer_key().unwrap();
|
||||
}
|
||||
}
|
||||
Ok(())
|
||||
|
|
Loading…
Reference in New Issue