mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-02-26 15:47:21 +00:00
core/types: sanity check the basefee length inside a header (#23171)
This commit is contained in:
parent
d21a069619
commit
e13d14e6a3
1 changed files with 5 additions and 0 deletions
|
|
@ -129,6 +129,11 @@ func (h *Header) SanityCheck() error {
|
|||
if eLen := len(h.Extra); eLen > 100*1024 {
|
||||
return fmt.Errorf("too large block extradata: size %d", eLen)
|
||||
}
|
||||
if h.BaseFee != nil {
|
||||
if bfLen := h.BaseFee.BitLen(); bfLen > 256 {
|
||||
return fmt.Errorf("too large base fee: bitlen %d", bfLen)
|
||||
}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue