allow overwriting block hash

This commit is contained in:
Tony Chen 2025-03-31 17:51:44 +08:00
parent 7e26589b67
commit f7ed2af11e

View file

@ -493,6 +493,11 @@ func (b *Block) Hash() common.Hash {
return v
}
// Used by tracer/simulation. Should never be called in actual execution.
func (b *Block) OverwriteHash(h common.Hash) {
b.hash.Store(h)
}
type Blocks []*Block
// HeaderParentHashFromRLP returns the parentHash of an RLP-encoded