tests: use EmptyUncleHash, EmptyCodeHash instead of raw value

This commit is contained in:
buddh0 2024-03-01 11:34:34 +08:00
parent 0a2f33946b
commit 3309091661
2 changed files with 2 additions and 2 deletions

View file

@ -648,7 +648,7 @@ The server should reject the request.`,
0, 1, 2, 3, 4, 5, 6, 7, 8, 0, 1, 2, 3, 4, 5, 6, 7, 8, 0, 1, 2, 3, 4, 5, 6, 7, 8}},
},
nBytes: 5000,
expHashes: []common.Hash{common.HexToHash("0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470")},
expHashes: []common.Hash{types.EmptyCodeHash},
},
{

View file

@ -196,7 +196,7 @@ func TestEIP2718BlockEncoding(t *testing.T) {
func TestUncleHash(t *testing.T) {
uncles := make([]*Header, 0)
h := CalcUncleHash(uncles)
exp := common.HexToHash("1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347")
exp := EmptyUncleHash
if h != exp {
t.Fatalf("empty uncle hash is wrong, got %x != %x", h, exp)
}