good morning!!!!

Skip to content
Snippets Groups Projects
Unverified Commit e13d14e6 authored by Péter Szilágyi's avatar Péter Szilágyi Committed by GitHub
Browse files

core/types: sanity check the basefee length inside a header (#23171)

parent d21a0696
No related branches found
No related tags found
No related merge requests found
......@@ -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
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment