mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-19 19:30:44 +00:00
miner: cap configured MaxBlobsPerBlock to protocol limit
Previously the user-configured MaxBlobsPerBlock replaced the protocol limit unconditionally, allowing the miner to build blocks exceeding the consensus maximum. Only apply the configured value when it is below the protocol-defined cap.
This commit is contained in:
parent
e3b6d0c86f
commit
63add3db8b
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