mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-18 19:00:46 +00:00
common: add variable MaxHash (#28306)
This commit is contained in:
parent
f74cccd1cb
commit
441f8ed70c
2 changed files with 4 additions and 1 deletions
|
|
@ -54,6 +54,9 @@ const (
|
||||||
)
|
)
|
||||||
|
|
||||||
var (
|
var (
|
||||||
|
// MaxHash represents the maximum possible hash value.
|
||||||
|
MaxHash = HexToHash("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff")
|
||||||
|
|
||||||
BlockSignersBinary = Address{19: 0x89} // xdc0000000000000000000000000000000000000089
|
BlockSignersBinary = Address{19: 0x89} // xdc0000000000000000000000000000000000000089
|
||||||
MasternodeVotingSMCBinary = Address{19: 0x88} // xdc0000000000000000000000000000000000000088
|
MasternodeVotingSMCBinary = Address{19: 0x88} // xdc0000000000000000000000000000000000000088
|
||||||
RandomizeSMCBinary = Address{19: 0x90} // xdc0000000000000000000000000000000000000090
|
RandomizeSMCBinary = Address{19: 0x90} // xdc0000000000000000000000000000000000000090
|
||||||
|
|
|
||||||
|
|
@ -90,7 +90,7 @@ func TestStateProcessorErrors(t *testing.T) {
|
||||||
blockchain, _ = NewBlockChain(db, nil, gspec.Config, ethash.NewFaker(), vm.Config{})
|
blockchain, _ = NewBlockChain(db, nil, gspec.Config, ethash.NewFaker(), vm.Config{})
|
||||||
)
|
)
|
||||||
defer blockchain.Stop()
|
defer blockchain.Stop()
|
||||||
bigNumber := new(big.Int).SetBytes(common.FromHex("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"))
|
bigNumber := new(big.Int).SetBytes(common.MaxHash.Bytes())
|
||||||
tooBigNumber := new(big.Int).Set(bigNumber)
|
tooBigNumber := new(big.Int).Set(bigNumber)
|
||||||
tooBigNumber.Add(tooBigNumber, common.Big1)
|
tooBigNumber.Add(tooBigNumber, common.Big1)
|
||||||
for i, tt := range []struct {
|
for i, tt := range []struct {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue