ReadableAccount.data returns slice (#16686)

* ReadAbleAccount.data returns slice

* more slice fixup

* more slice

* slice
This commit is contained in:
Jeff Washington (jwash)
2021-04-20 16:41:16 -05:00
committed by GitHub
parent 08d5253651
commit 03f7b251b8
5 changed files with 18 additions and 18 deletions

View File

@ -520,7 +520,7 @@ impl<'a> InvokeContext for ThisInvokeContext<'a> {
result = self
.account_db
.load_with_fixed_root(self.ancestors, id)
.map(|(account, _)| Rc::new(account.data().clone()));
.map(|(account, _)| Rc::new(account.data().to_vec()));
// Cache it
self.sysvars.push((*id, result.clone()));
}
@ -919,7 +919,7 @@ impl MessageProcessor {
dst_keyed_account.try_account_ref_mut()?.owner = src_keyed_account.owner;
dst_keyed_account
.try_account_ref_mut()?
.set_data(src_keyed_account.data().clone());
.set_data(src_keyed_account.data().to_vec());
}
}
}