set_lamports() (#16921)

This commit is contained in:
Jeff Washington (jwash)
2021-04-28 16:30:06 -05:00
committed by GitHub
parent 8dc15f727c
commit a7070a5ca7
2 changed files with 5 additions and 3 deletions

View File

@ -915,7 +915,9 @@ impl MessageProcessor {
);
return Err(InstructionError::InvalidRealloc);
}
dst_keyed_account.try_account_ref_mut()?.lamports = src_keyed_account.lamports;
dst_keyed_account
.try_account_ref_mut()?
.set_lamports(src_keyed_account.lamports());
dst_keyed_account
.try_account_ref_mut()?
.set_owner(*src_keyed_account.owner());