triehash is separated from util (#6428)

This commit is contained in:
Marek Kotewicz
2017-09-03 09:11:14 +02:00
committed by Gav Wood
parent 7b8af30590
commit b731ccea18
24 changed files with 124 additions and 139 deletions

View File

@@ -23,7 +23,7 @@ use hash::keccak;
use views::BlockView;
use rlp::{DecoderError, RlpStream, UntrustedRlp};
use util::{Bytes, H256};
use util::triehash::ordered_trie_root;
use triehash::ordered_trie_root;
const HEADER_FIELDS: usize = 8;
const BLOCK_FIELDS: usize = 2;
@@ -190,7 +190,7 @@ mod tests {
b.transactions.push(t2.into());
let receipts_root = b.header.receipts_root().clone();
b.header.set_transactions_root(::util::triehash::ordered_trie_root(
b.header.set_transactions_root(::triehash::ordered_trie_root(
b.transactions.iter().map(::rlp::encode).map(|out| out.into_vec())
));

View File

@@ -222,7 +222,7 @@ impl Rebuilder for PowRebuilder {
use views::BlockView;
use snapshot::verify_old_block;
use util::U256;
use util::triehash::ordered_trie_root;
use triehash::ordered_trie_root;
let rlp = UntrustedRlp::new(chunk);
let item_count = rlp.item_count()?;