diff --git a/fluffy/eth_data/era1.nim b/fluffy/eth_data/era1.nim index 2f4f670eb..150673d8c 100644 --- a/fluffy/eth_data/era1.nim +++ b/fluffy/eth_data/era1.nim @@ -467,7 +467,7 @@ proc verify*(f: Era1File): Result[Digest, string] = ?f.getBlockTuple(blockNumber) txRoot = calcTxRoot(blockBody.transactions) - ommershHash = keccakHash(rlp.encode(blockBody.uncles)) + ommershHash = rlpHash(blockBody.uncles) if blockHeader.txRoot != txRoot: return err("Invalid transactions root") diff --git a/fluffy/network/state/state_validation.nim b/fluffy/network/state/state_validation.nim index 7ad90bc18..200dba922 100644 --- a/fluffy/network/state/state_validation.nim +++ b/fluffy/network/state/state_validation.nim @@ -24,7 +24,7 @@ proc isValidNextNode( let nextHash = if hashOrShortRlp.isList(): # is a short node - keccakHash(rlp.encode(hashOrShortRlp)) + rlpHash(hashOrShortRlp) else: let hash = hashOrShortRlp.toBytes() if hash.len() != 32: diff --git a/fluffy/rpc/rpc_eth_api.nim b/fluffy/rpc/rpc_eth_api.nim index 09b772d48..f9d85dd4a 100644 --- a/fluffy/rpc/rpc_eth_api.nim +++ b/fluffy/rpc/rpc_eth_api.nim @@ -119,7 +119,7 @@ func init*( inc i else: for tx in body.transactions: - blockObject.transactions.add txOrHash(w3Hash keccakHash(rlp.encode(tx))) + blockObject.transactions.add txOrHash(w3Hash rlpHash(tx)) blockObject