consensus/clique: avoid a copy in clique (#23149)
* consensus/clique:optimize to avoid a copy in clique * consensus/clique: test for sealhash Co-authored-by: Martin Holst Swende <martin@swende.se>
This commit is contained in:
@ -112,3 +112,16 @@ func TestReimportMirroredState(t *testing.T) {
|
||||
t.Fatalf("chain head mismatch: have %d, want %d", head, 3)
|
||||
}
|
||||
}
|
||||
|
||||
func TestSealHash(t *testing.T) {
|
||||
have := SealHash(&types.Header{
|
||||
Difficulty: new(big.Int),
|
||||
Number: new(big.Int),
|
||||
Extra: make([]byte, 32+65),
|
||||
BaseFee: new(big.Int),
|
||||
})
|
||||
want := common.HexToHash("0xbd3d1fa43fbc4c5bfcc91b179ec92e2861df3654de60468beb908ff805359e8f")
|
||||
if have != want {
|
||||
t.Errorf("have %x, want %x", have, want)
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user