mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-07-25 07:05:44 +00:00
Fix benchmarks (#1919)
* fixed benchmarks broken by rejecting storage proofs with excessive trie nodes and justifications with extra prevotes * update weights * fmt * accidental paste * revert changes to millau runtime (separate PR) * revert comment change
This commit is contained in:
committed by
Bastian Köcher
parent
7be2cb1cdd
commit
aa466a485d
@@ -25,7 +25,7 @@ use crate::{
|
||||
AccountIdOf, BridgedChain, HashOf, HasherOf, MessageBridge, ThisChain,
|
||||
},
|
||||
messages_generation::{
|
||||
encode_all_messages, encode_lane_data, grow_trie, prepare_messages_storage_proof,
|
||||
encode_all_messages, encode_lane_data, grow_trie_leaf_value, prepare_messages_storage_proof,
|
||||
},
|
||||
};
|
||||
|
||||
@@ -204,11 +204,12 @@ where
|
||||
{
|
||||
let mut trie =
|
||||
TrieDBMutBuilderV1::<HasherOf<BridgedChain<B>>>::new(&mut mdb, &mut root).build();
|
||||
trie.insert(&storage_key, ¶ms.inbound_lane_data.encode())
|
||||
let inbound_lane_data =
|
||||
grow_trie_leaf_value(params.inbound_lane_data.encode(), params.size);
|
||||
trie.insert(&storage_key, &inbound_lane_data)
|
||||
.map_err(|_| "TrieMut::insert has failed")
|
||||
.expect("TrieMut::insert should not fail in benchmarks");
|
||||
}
|
||||
root = grow_trie(root, &mut mdb, params.size);
|
||||
|
||||
// generate storage proof to be delivered to This chain
|
||||
let storage_proof = record_all_trie_keys::<LayoutV1<HasherOf<BridgedChain<B>>>, _>(&mdb, &root)
|
||||
|
||||
Reference in New Issue
Block a user