mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-27 19:51:09 +00:00
Some changes tries optimizations (#2840)
* changes tries initial optimizations * line width
This commit is contained in:
committed by
Gavin Wood
parent
1b5bafc8de
commit
95061beb79
@@ -17,7 +17,7 @@
|
||||
//! The overlayed changes to state.
|
||||
|
||||
#[cfg(test)] use std::iter::FromIterator;
|
||||
use std::collections::{HashMap, HashSet};
|
||||
use std::collections::{HashMap, BTreeSet};
|
||||
use parity_codec::Decode;
|
||||
use crate::changes_trie::{NO_EXTRINSIC_INDEX, Configuration as ChangesTrieConfig};
|
||||
use primitives::storage::well_known_keys::EXTRINSIC_INDEX;
|
||||
@@ -45,7 +45,7 @@ pub struct OverlayedValue {
|
||||
pub value: Option<Vec<u8>>,
|
||||
/// The set of extinsic indices where the values has been changed.
|
||||
/// Is filled only if runtime has announced changes trie support.
|
||||
pub extrinsics: Option<HashSet<u32>>,
|
||||
pub extrinsics: Option<BTreeSet<u32>>,
|
||||
}
|
||||
|
||||
/// Prospective or committed overlayed change set.
|
||||
@@ -55,7 +55,7 @@ pub struct OverlayedChangeSet {
|
||||
/// Top level storage changes.
|
||||
pub top: HashMap<Vec<u8>, OverlayedValue>,
|
||||
/// Child storage changes.
|
||||
pub children: HashMap<Vec<u8>, (Option<HashSet<u32>>, HashMap<Vec<u8>, Option<Vec<u8>>>)>,
|
||||
pub children: HashMap<Vec<u8>, (Option<BTreeSet<u32>>, HashMap<Vec<u8>, Option<Vec<u8>>>)>,
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
|
||||
Reference in New Issue
Block a user