diff --git a/nimbus/db/aristo/aristo_desc/desc_identifiers.nim b/nimbus/db/aristo/aristo_desc/desc_identifiers.nim index b5b87a2ae..2a7e65fc4 100644 --- a/nimbus/db/aristo/aristo_desc/desc_identifiers.nim +++ b/nimbus/db/aristo/aristo_desc/desc_identifiers.nim @@ -397,23 +397,6 @@ func `$`*(vids: HashSet[VertexID]): string = "$" & it.uint64.toHex.strip(trailing=false,chars={'0'}) ).join(",") & "}" -func `$`*(key: Hash256): string = - let w = UInt256.fromBytesBE key.data - if w == high(UInt256): - "2^256-1" - elif w == 0.u256: - "0" - elif w == 2.u256.pow 255: - "2^255" # 800... - elif w == 2.u256.pow 254: - "2^254" # 400.. - elif w == 2.u256.pow 253: - "2^253" # 200... - elif w == 2.u256.pow 251: - "2^252" # 100... - else: - w.toHex - func `$`*(key: HashKey): string = toHex(key.data) diff --git a/nimbus/evm/stack.nim b/nimbus/evm/stack.nim index 8fe0d8944..76d405d0e 100644 --- a/nimbus/evm/stack.nim +++ b/nimbus/evm/stack.nim @@ -41,7 +41,7 @@ template toStackElem(v: EvmStackInts, elem: EvmStackElement) = template toStackElem(v: EthAddress, elem: EvmStackElement) = elem.initFromBytesBE(v) -template toStackElem(v: MDigest, elem: EvmStackElement) = +template toStackElem(v: Hash256, elem: EvmStackElement) = elem.initFromBytesBE(v.data) template toStackElem(v: openArray[byte], elem: EvmStackElement) = @@ -254,4 +254,3 @@ template unaryAddress*(stack: EvmStack, unOp): EvmResultVoid = EvmResultVoid.ok() else: EvmResultVoid.err(stackErr(StackInsufficient)) - \ No newline at end of file diff --git a/tests/replay/pp_light.nim b/tests/replay/pp_light.nim index 100e06d65..42d2f15cf 100644 --- a/tests/replay/pp_light.nim +++ b/tests/replay/pp_light.nim @@ -120,7 +120,7 @@ func pp*(q: openArray[int]; itemsPerLine: int; lineSep: string): string = .mapIt(it.mapIt(&"0x{it:02x}").join(", ")) .join("," & lineSep) -func pp*(a: MDigest[256]; collapse = true): string = +func pp*(a: Hash256; collapse = true): string = if not collapse: a.data.toHex elif a == ZERO_HASH256: @@ -136,7 +136,7 @@ func pp*(a: MDigest[256]; collapse = true): string = else: "£" & a.data.toHex.join[0..6] & ".." & a.data.toHex.join[56..63] -func pp*(a: openArray[MDigest[256]]; collapse = true): string = +func pp*(a: openArray[Hash256]; collapse = true): string = "@[" & a.toSeq.mapIt(it.pp).join(" ") & "]" func pp*(q: openArray[int]; itemsPerLine: int; indent: int): string = @@ -146,7 +146,7 @@ func pp*(q: openArray[byte]; noHash = false): string = if q.len == 32 and not noHash: var a: array[32,byte] for n in 0..31: a[n] = q[n] - MDigest[256](data: a).pp + Hash256(data: a).pp else: q.toHex.pp(hex = true) diff --git a/vendor/nim-eth b/vendor/nim-eth index ebfe63b9b..864d54467 160000 --- a/vendor/nim-eth +++ b/vendor/nim-eth @@ -1 +1 @@ -Subproject commit ebfe63b9b6523a1823e4505f0972d81047a77cf5 +Subproject commit 864d54467e09c08d62b508149e9184001a813363