Kovan warp sync fixed

This commit is contained in:
arkpar
2017-03-29 19:59:20 +02:00
parent e0d5eedff7
commit 3915943f57
12 changed files with 56 additions and 26 deletions

View File

@@ -492,6 +492,16 @@ impl LockedBlock {
_ => Ok(SealedBlock { block: s.block, uncle_bytes: s.uncle_bytes }),
}
}
/// Remove state root from transaction receipts to make them EIP-98 compatible.
pub fn strip_receipts(self) -> LockedBlock {
let mut block = self;
for receipt in &mut block.block.receipts {
receipt.state_root = None;
}
block.block.header.set_receipts_root(ordered_trie_root(block.block.receipts.iter().map(|r| r.rlp_bytes().to_vec())));
block
}
}
impl Drain for LockedBlock {