Rename `ZERO_HASH32` to `ZERO_HASH256` to match `Hash256` type

Nimbus types generally use the bit count not the byte count, e.g. `UInt256`,
`Hash256`, so make `ZERO_HASH256` (which has type `Hash256`) fit this pattern.

Signed-off-by: Jamie Lokier <jamie@shareable.org>
This commit is contained in:
Jamie Lokier 2021-06-11 12:48:22 +01:00
parent 7213d3e67a
commit a1fab0e918
No known key found for this signature in database
GPG Key ID: CBC25C68435C30A2
2 changed files with 5 additions and 5 deletions

View File

@ -16,8 +16,8 @@ const
# address zero by accident, unrecoverably, due to poor user interface issues. # address zero by accident, unrecoverably, due to poor user interface issues.
ZERO_ADDRESS* = default(EthAddress) ZERO_ADDRESS* = default(EthAddress)
# ZERO_HASH32 is the parent hash of genesis blocks. # ZERO_HASH256 is the parent hash of genesis blocks.
ZERO_HASH32* = Hash256() ZERO_HASH256* = Hash256()
GAS_LIMIT_EMA_DENOMINATOR* = 1_024 GAS_LIMIT_EMA_DENOMINATOR* = 1_024
GAS_LIMIT_ADJUSTMENT_FACTOR* = 1_024 GAS_LIMIT_ADJUSTMENT_FACTOR* = 1_024
@ -43,10 +43,10 @@ const
GENESIS_BLOCK_NUMBER* = 0.toBlockNumber GENESIS_BLOCK_NUMBER* = 0.toBlockNumber
GENESIS_DIFFICULTY* = 131_072.u256 GENESIS_DIFFICULTY* = 131_072.u256
GENESIS_GAS_LIMIT* = 3_141_592 GENESIS_GAS_LIMIT* = 3_141_592
GENESIS_PARENT_HASH* = ZERO_HASH32 GENESIS_PARENT_HASH* = ZERO_HASH256
GENESIS_COINBASE* = ZERO_ADDRESS GENESIS_COINBASE* = ZERO_ADDRESS
GENESIS_NONCE* = "\x00\x00\x00\x00\x00\x00\x00B" GENESIS_NONCE* = "\x00\x00\x00\x00\x00\x00\x00B"
GENESIS_MIX_HASH* = ZERO_HASH32 GENESIS_MIX_HASH* = ZERO_HASH256
GENESIS_EXTRA_DATA* = "" GENESIS_EXTRA_DATA* = ""
GAS_LIMIT_MINIMUM* = 5000 GAS_LIMIT_MINIMUM* = 5000
GAS_LIMIT_MAXIMUM* = high(GasInt) GAS_LIMIT_MAXIMUM* = high(GasInt)

View File

@ -295,7 +295,7 @@ proc cliqueVerifyImpl*(c: Clique; header: BlockHeader;
## optionally pass in a batch of parents (ascending order) to avoid looking ## optionally pass in a batch of parents (ascending order) to avoid looking
## those up from the database. This is useful for concurrently verifying ## those up from the database. This is useful for concurrently verifying
## a batch of new headers. ## a batch of new headers.
c.failed = (ZERO_HASH32,cliqueNoError) c.failed = (ZERO_HASH256,cliqueNoError)
block: block:
# Check header fields independent of parent blocks # Check header fields independent of parent blocks