cleanup a few more rlpHash calls (#2359)
This commit is contained in:
parent
ad57575958
commit
8a0772ac10
|
@ -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")
|
||||
|
|
|
@ -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:
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in New Issue