mirror of
https://gitlab.com/pulsechaincom/erigon-pulse.git
synced 2024-12-22 03:30:37 +00:00
parent
757a91c44d
commit
f1477e5b2c
@ -1579,6 +1579,10 @@ func (b *Block) HashCheck() error {
|
||||
return fmt.Errorf("block has empty receipt hash: %x but it includes %x transactions", b.ReceiptHash(), len(b.transactions))
|
||||
}
|
||||
|
||||
if len(b.transactions) == 0 && b.ReceiptHash() != EmptyRootHash {
|
||||
return fmt.Errorf("block has non-empty receipt hash: %x but no transactions", b.ReceiptHash())
|
||||
}
|
||||
|
||||
if hash := CalcUncleHash(b.Uncles()); hash != b.UncleHash() {
|
||||
return fmt.Errorf("block has invalid uncle hash: have %x, exp: %x", hash, b.UncleHash())
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user