AccountsSharedData: data copy on write (#15800)
* Arc<AccountData> * try custom serializer * adapt test from Behzad's change * clippy * simplify serialization * remove abi example derive * refactor 'take' * remove serialization * remove serialize calls * remove account_data * remove intos * remove left over file
This commit is contained in:
committed by
GitHub
parent
6f5d8d18e9
commit
2d24d13046
@ -1559,8 +1559,9 @@ mod tests {
|
||||
}
|
||||
|
||||
fn truncate_data(account: &mut AccountSharedData, len: usize) {
|
||||
// when account data becomes copy on write, this operation will be more complicated
|
||||
account.data.truncate(len);
|
||||
let mut data = account.data.to_vec();
|
||||
data.truncate(len);
|
||||
account.set_data(data);
|
||||
}
|
||||
|
||||
#[test]
|
||||
|
Reference in New Issue
Block a user