Snapshot format changes (#2234)
Closes #2213 Omit transaction and receipt roots from abridged block. No longer use RLP compression. Make ordered_trie_root generic over an iterator to save an allocation. Breaks snapshot format backwards compatibility (with other 1.4 snapshots -- it's already been broken with 1.3). Documentation will need updating
This commit is contained in:
committed by
Gav Wood
parent
862feb7172
commit
723d837d05
@@ -40,7 +40,9 @@ use vector::SharedPrefix;
|
||||
/// assert_eq!(ordered_trie_root(v), H256::from_str(root).unwrap());
|
||||
/// }
|
||||
/// ```
|
||||
pub fn ordered_trie_root(input: Vec<Vec<u8>>) -> H256 {
|
||||
pub fn ordered_trie_root<I>(input: I) -> H256
|
||||
where I: IntoIterator<Item=Vec<u8>>
|
||||
{
|
||||
let gen_input = input
|
||||
// first put elements into btree to sort them by nibbles
|
||||
// optimize it later
|
||||
|
||||
Reference in New Issue
Block a user