remove redundant prints
This commit is contained in:
parent
b8c1447c04
commit
9650494311
@ -145,7 +145,6 @@ fn as_nibbles(bytes: &[u8]) -> Vec<u8> {
|
|||||||
fn hash256rlp(input: &[(Vec<u8>, Vec<u8>)], pre_len: usize, stream: &mut RlpStream) {
|
fn hash256rlp(input: &[(Vec<u8>, Vec<u8>)], pre_len: usize, stream: &mut RlpStream) {
|
||||||
let inlen = input.len();
|
let inlen = input.len();
|
||||||
|
|
||||||
//println!("input: {:?}", input);
|
|
||||||
// in case of empty slice, just append empty data
|
// in case of empty slice, just append empty data
|
||||||
if inlen == 0 {
|
if inlen == 0 {
|
||||||
stream.append_empty_data();
|
stream.append_empty_data();
|
||||||
@ -174,7 +173,6 @@ fn hash256rlp(input: &[(Vec<u8>, Vec<u8>)], pre_len: usize, stream: &mut RlpStre
|
|||||||
cmp::min(key.shared_prefix_len(&k), acc)
|
cmp::min(key.shared_prefix_len(&k), acc)
|
||||||
});
|
});
|
||||||
|
|
||||||
println!("shared_prefix: {}, prefix_len: {}", shared_prefix, pre_len);
|
|
||||||
// if shared prefix is higher than current prefix append its
|
// if shared prefix is higher than current prefix append its
|
||||||
// new part of the key to the stream
|
// new part of the key to the stream
|
||||||
// then recursively append suffixes of all items who had this key
|
// then recursively append suffixes of all items who had this key
|
||||||
@ -200,8 +198,8 @@ fn hash256rlp(input: &[(Vec<u8>, Vec<u8>)], pre_len: usize, stream: &mut RlpStre
|
|||||||
// cout how many successive elements have same next nibble
|
// cout how many successive elements have same next nibble
|
||||||
let len = match begin < input.len() {
|
let len = match begin < input.len() {
|
||||||
true => input[begin..].iter()
|
true => input[begin..].iter()
|
||||||
.take_while(| pair | { println!("{:?}", pair.0); pair.0[pre_len] == i }).count(),
|
.take_while(| pair | pair.0[pre_len] == i )
|
||||||
//.take_while(|&q| q == i).count(),
|
.count(),
|
||||||
false => 0
|
false => 0
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user