consensus/misc/eip4844: fix nil panic in Amsterdam blob config lookup

The Amsterdam case in latestBlobConfig incorrectly assigned s.BPO2
instead of s.Amsterdam, causing a nil pointer dereference when the
genesis config defines an Amsterdam blob schedule but not BPO2.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
qu0b 2026-01-30 16:27:24 +00:00
parent 14e3daa4e2
commit f93a6d2218

View file

@ -70,7 +70,7 @@ func latestBlobConfig(cfg *params.ChainConfig, time uint64) *BlobConfig {
case cfg.IsBPO3(london, time) && s.BPO3 != nil:
bc = s.BPO3
case cfg.IsAmsterdam(london, time) && s.Amsterdam != nil:
bc = s.BPO2
bc = s.Amsterdam
case cfg.IsBPO2(london, time) && s.BPO2 != nil:
bc = s.BPO2
case cfg.IsBPO1(london, time) && s.BPO1 != nil: