mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-15 17:30:44 +00:00
miner: cap configured MaxBlobsPerBlock to protocol limit (#35295)
## Summary - Only apply user-configured `MaxBlobsPerBlock` when it is strictly below the protocol-defined maximum. - Prevents the miner from building blocks that exceed the consensus blob limit. ## Test plan - [x] `go test -short ./miner/`
This commit is contained in:
parent
df7b89603c
commit
3140668d49
1 changed files with 2 additions and 2 deletions
|
|
@ -51,8 +51,8 @@ var (
|
|||
// Users can specify the maximum number of blobs per block if necessary.
|
||||
func (miner *Miner) maxBlobsPerBlock(time uint64) int {
|
||||
maxBlobs := eip4844.MaxBlobsPerBlock(miner.chainConfig, time)
|
||||
if miner.config.MaxBlobsPerBlock != 0 {
|
||||
maxBlobs = miner.config.MaxBlobsPerBlock
|
||||
if configured := miner.config.MaxBlobsPerBlock; configured != 0 && configured < maxBlobs {
|
||||
maxBlobs = configured
|
||||
}
|
||||
return maxBlobs
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue