Add additionally functionality to contracts storage interface (#10497)

* Add new versions for storage access host functions

* Improve docs
This commit is contained in:
Alexander Theißen
2022-01-08 13:19:23 +01:00
committed by GitHub
parent 4b9818a06a
commit 46e38e8288
8 changed files with 1394 additions and 602 deletions
+6 -3
View File
@@ -1545,7 +1545,8 @@ fn lazy_removal_partial_remove_works() {
// Put value into the contracts child trie
for val in &vals {
Storage::<Test>::write(&info.trie_id, &val.0, Some(val.2.clone()), None).unwrap();
Storage::<Test>::write(&info.trie_id, &val.0, Some(val.2.clone()), None, false)
.unwrap();
}
<ContractInfoOf<Test>>::insert(&addr, info.clone());
@@ -1629,7 +1630,8 @@ fn lazy_removal_does_no_run_on_full_block() {
// Put value into the contracts child trie
for val in &vals {
Storage::<Test>::write(&info.trie_id, &val.0, Some(val.2.clone()), None).unwrap();
Storage::<Test>::write(&info.trie_id, &val.0, Some(val.2.clone()), None, false)
.unwrap();
}
<ContractInfoOf<Test>>::insert(&addr, info.clone());
@@ -1712,7 +1714,8 @@ fn lazy_removal_does_not_use_all_weight() {
// Put value into the contracts child trie
for val in &vals {
Storage::<Test>::write(&info.trie_id, &val.0, Some(val.2.clone()), None).unwrap();
Storage::<Test>::write(&info.trie_id, &val.0, Some(val.2.clone()), None, false)
.unwrap();
}
<ContractInfoOf<Test>>::insert(&addr, info.clone());