Skip to content

Commit

Permalink
Messages pallet benchmarks - cosmetics (#2175)
Browse files Browse the repository at this point in the history
  • Loading branch information
serban300 authored and bkontur committed May 21, 2024
1 parent 2d4b951 commit 60ce797
Show file tree
Hide file tree
Showing 5 changed files with 283 additions and 261 deletions.
6 changes: 3 additions & 3 deletions bridges/bin/runtime-common/src/messages_generation.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ use bp_messages::{
OutboundLaneData,
};
use bp_runtime::{
record_all_trie_keys, Chain, RawStorageProof, StorageProofSize, UnderlyingChainOf,
UntrustedVecDb,
record_all_trie_keys, Chain, RangeInclusiveExt, RawStorageProof, StorageProofSize,
UnderlyingChainOf, UntrustedVecDb,
};
use codec::Encode;
use frame_support::sp_runtime::StateVersion;
Expand Down Expand Up @@ -112,7 +112,7 @@ where
HashOf<BridgedChain<B>>: Copy + Default,
{
// prepare Bridged chain storage with messages and (optionally) outbound lane state
let message_count = message_nonces.end().saturating_sub(*message_nonces.start()) + 1;
let message_count = message_nonces.saturating_len();
let mut storage_keys = Vec::with_capacity(message_count as usize + 1);
let mut root = Default::default();
let mut mdb = MemoryDB::default();
Expand Down
Loading

0 comments on commit 60ce797

Please sign in to comment.