all: use EmptyUncleHash, EmptyCodeHash instead of raw value (#29134)

pull/28940/head
buddho 8 months ago committed by GitHub
parent 5a1e8a6547
commit 679a27a2b3
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 2
      cmd/devp2p/internal/ethtest/snap.go
  2. 2
      core/types/block_test.go

@ -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}}, 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, nBytes: 5000,
expHashes: []common.Hash{common.HexToHash("0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470")}, expHashes: []common.Hash{types.EmptyCodeHash},
}, },
{ {

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

Loading…
Cancel
Save