Skip to content

Commit 3405adb

Browse files
committed
Update note
1 parent 9e62a06 commit 3405adb

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

p-token/src/processor/close_account.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,9 @@ pub fn process_close_account(accounts: &[AccountInfo]) -> ProgramResult {
5050
unsafe {
5151
// Moves the lamports to the destination account.
5252
//
53-
// Note: The total lamports supply is bound to `u64::MAX`.
53+
// Note: This is safe since the runtime checks for balanced instructions
54+
// before and after each CPI and instruction, and the total lamports
55+
// supply is bound to `u64::MAX`.
5456
*destination_account_info.borrow_mut_lamports_unchecked() += source_account_info.lamports();
5557
// Closes the source account.
5658
source_account_info.close_unchecked();

0 commit comments

Comments
 (0)