Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion program/src/extension/confidential_transfer/processor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ fn reallocate_for_configure_account_with_registry<'a>(
"account needs realloc, +{:?} bytes",
needed_account_len - token_account_info.data_len()
);
token_account_info.realloc(needed_account_len, false)?;
token_account_info.realloc(needed_account_len, true)?;

// if additional lamports needed to remain rent-exempt, transfer them
let rent = Rent::get()?;
Expand Down
6 changes: 3 additions & 3 deletions program/src/extension/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1463,7 +1463,7 @@ pub(crate) fn alloc_and_serialize<S: BaseState + Pod, V: Default + Extension + P

// Realloc the account first, if needed
if new_account_len > previous_account_len {
account_info.realloc(new_account_len, false)?;
account_info.realloc(new_account_len, true)?;
}
let mut buffer = account_info.try_borrow_mut_data()?;
if previous_account_len <= BASE_ACCOUNT_LENGTH {
Expand Down Expand Up @@ -1511,7 +1511,7 @@ pub(crate) fn alloc_and_serialize_variable_len_extension<
if previous_account_len < new_account_len {
// account size increased, so realloc the account, then the TLV entry, then
// write data
account_info.realloc(new_account_len, false)?;
account_info.realloc(new_account_len, true)?;
let mut buffer = account_info.try_borrow_mut_data()?;
if extension_already_exists {
let mut state = PodStateWithExtensionsMut::<S>::unpack(&mut buffer)?;
Expand Down Expand Up @@ -1541,7 +1541,7 @@ pub(crate) fn alloc_and_serialize_variable_len_extension<
if removed_bytes > 0 {
// this is probably fine, but be safe and avoid invalidating references
drop(buffer);
account_info.realloc(new_account_len, false)?;
account_info.realloc(new_account_len, true)?;
}
}
Ok(())
Expand Down
2 changes: 1 addition & 1 deletion program/src/extension/reallocate.rs
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ pub fn process_reallocate(
"account needs realloc, +{:?} bytes",
needed_account_len - token_account_info.data_len()
);
token_account_info.realloc(needed_account_len, false)?;
token_account_info.realloc(needed_account_len, true)?;

// if additional lamports needed to remain rent-exempt, transfer them
let rent = Rent::get()?;
Expand Down
2 changes: 1 addition & 1 deletion program/src/processor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2020,7 +2020,7 @@ fn delete_account(account_info: &AccountInfo) -> Result<(), ProgramError> {
#[cfg(target_os = "solana")]
fn delete_account(account_info: &AccountInfo) -> Result<(), ProgramError> {
account_info.assign(&system_program::id());
account_info.realloc(0, false)
account_info.realloc(0, true)
}

#[cfg(test)]
Expand Down