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:
Jeff Washington (jwash)
2021-03-23 15:19:31 -05:00
committed by GitHub
parent 6f5d8d18e9
commit 2d24d13046
3 changed files with 22 additions and 25 deletions

View File

@ -413,7 +413,9 @@ pub mod tests {
// Vote account too big
let cache_data = vote_account.data().to_vec();
vote_account.data.push(0);
let mut pushed = vote_account.data.to_vec();
pushed.push(0);
vote_account.set_data(pushed);
stakes.store(&vote_pubkey, &vote_account, true, true);
{