mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-24 17:11:05 +00:00
keep track storage bytes (#2154)
* refactor * fix accountinfo creation + impl mem_stored * add comment * improve syntax Co-Authored-By: thiolliere <gui.thiolliere@gmail.com> * rename current_mem_stored -> storage_size * more explaination + more readable code * bump impl version of node + builds * delete builds
This commit is contained in:
@@ -248,7 +248,7 @@ fn account_removal_removes_storage() {
|
||||
Balances::deposit_creating(&1, 110);
|
||||
AccountInfoOf::<Test>::insert(1, &AccountInfo {
|
||||
trie_id: unique_id1.to_vec(),
|
||||
current_mem_stored: 0,
|
||||
storage_size: 0,
|
||||
});
|
||||
child::put(&unique_id1[..], &b"foo".to_vec(), &b"1".to_vec());
|
||||
assert_eq!(child::get(&unique_id1[..], &b"foo".to_vec()), Some(b"1".to_vec()));
|
||||
@@ -257,7 +257,7 @@ fn account_removal_removes_storage() {
|
||||
Balances::deposit_creating(&2, 110);
|
||||
AccountInfoOf::<Test>::insert(2, &AccountInfo {
|
||||
trie_id: unique_id2.to_vec(),
|
||||
current_mem_stored: 0,
|
||||
storage_size: 0,
|
||||
});
|
||||
child::put(&unique_id2[..], &b"hello".to_vec(), &b"3".to_vec());
|
||||
child::put(&unique_id2[..], &b"world".to_vec(), &b"4".to_vec());
|
||||
@@ -359,6 +359,8 @@ fn instantiate_and_call() {
|
||||
event: MetaEvent::contract(RawEvent::Instantiated(ALICE, BOB))
|
||||
}
|
||||
]);
|
||||
|
||||
assert!(AccountInfoOf::<Test>::exists(BOB));
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user