mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-02-26 07:37:20 +00:00
cmd/utils: fix dumpconfig (#33302)
This commit is contained in:
parent
446fdebdc3
commit
f43228152b
3 changed files with 4 additions and 5 deletions
|
|
@ -1577,8 +1577,7 @@ func setMiner(ctx *cli.Context, cfg *miner.Config) {
|
|||
cfg.Recommit = ctx.Duration(MinerNewPayloadTimeoutFlag.Name)
|
||||
}
|
||||
if ctx.IsSet(MinerMaxBlobsFlag.Name) {
|
||||
maxBlobs := ctx.Int(MinerMaxBlobsFlag.Name)
|
||||
cfg.MaxBlobsPerBlock = &maxBlobs
|
||||
cfg.MaxBlobsPerBlock = ctx.Int(MinerMaxBlobsFlag.Name)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -48,7 +48,7 @@ type Config struct {
|
|||
GasCeil uint64 // Target gas ceiling for mined blocks.
|
||||
GasPrice *big.Int // Minimum gas price for mining a transaction
|
||||
Recommit time.Duration // The time interval for miner to re-create mining work.
|
||||
MaxBlobsPerBlock *int // Maximum number of blobs per block (unset uses protocol default)
|
||||
MaxBlobsPerBlock int // Maximum number of blobs per block (0 for unset uses protocol default)
|
||||
}
|
||||
|
||||
// DefaultConfig contains default settings for miner.
|
||||
|
|
|
|||
|
|
@ -47,8 +47,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 != nil {
|
||||
maxBlobs = *miner.config.MaxBlobsPerBlock
|
||||
if miner.config.MaxBlobsPerBlock != 0 {
|
||||
maxBlobs = miner.config.MaxBlobsPerBlock
|
||||
}
|
||||
return maxBlobs
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue