fix(worker): set default account fetch limit (#756)

This commit is contained in:
Péter Garamvölgyi 2024-05-17 18:17:43 +01:00 committed by GitHub
parent 6038ac8753
commit caec0c34fa
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 8 additions and 1 deletions

View file

@ -20,6 +20,7 @@ import (
"bytes"
"errors"
"fmt"
"math"
"math/big"
"sync"
"sync/atomic"
@ -307,6 +308,12 @@ func newWorker(config *Config, chainConfig *params.ChainConfig, engine consensus
recommit = minRecommitInterval
}
// Sanitize account fetch limit.
if worker.config.MaxAccountsNum == 0 {
log.Warn("Sanitizing miner account fetch limit", "provided", worker.config.MaxAccountsNum, "updated", math.MaxInt)
worker.config.MaxAccountsNum = math.MaxInt
}
worker.wg.Add(4)
go worker.mainLoop()
go worker.newWorkLoop(recommit)

View file

@ -24,7 +24,7 @@ import (
const (
VersionMajor = 5 // Major version component of the current release
VersionMinor = 3 // Minor version component of the current release
VersionPatch = 16 // Patch version component of the current release
VersionPatch = 17 // Patch version component of the current release
VersionMeta = "mainnet" // Version metadata to append to the version string
)