mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-26 06:36:43 +00:00
fix : runtime testcases
This commit is contained in:
parent
43e114beda
commit
64486d0a82
3 changed files with 12 additions and 11 deletions
|
|
@ -420,6 +420,7 @@ func (pool *TxPool) loop() {
|
|||
|
||||
// Handle stats reporting ticks
|
||||
case <-report.C:
|
||||
pool.mu.RLock()
|
||||
pending, queued := pool.stats()
|
||||
pool.mu.RUnlock()
|
||||
stales := int(pool.priced.stales.Load())
|
||||
|
|
|
|||
|
|
@ -189,8 +189,6 @@ func New(stack *node.Node, config *ethconfig.Config) (*Ethereum, error) {
|
|||
gpoParams.Default = config.Miner.GasPrice
|
||||
}
|
||||
|
||||
ethereum.APIBackend.gpo = gasprice.NewOracle(ethereum.APIBackend, gpoParams)
|
||||
|
||||
// Override the chain config with provided settings.
|
||||
var overrides core.ChainOverrides
|
||||
if config.OverrideShanghai != nil {
|
||||
|
|
@ -258,6 +256,8 @@ func New(stack *node.Node, config *ethconfig.Config) (*Ethereum, error) {
|
|||
ethereum.blockchain, err = core.NewBlockChain(chainDb, cacheConfig, config.Genesis, &overrides, ethereum.engine, vmConfig, ethereum.shouldPreserve, &config.TxLookupLimit, checker)
|
||||
}
|
||||
|
||||
ethereum.APIBackend.gpo = gasprice.NewOracle(ethereum.APIBackend, gpoParams)
|
||||
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
|
@ -530,7 +530,6 @@ func (s *Ethereum) StartMining(threads int) error {
|
|||
|
||||
cli.Authorize(eb, wallet.SignData)
|
||||
}
|
||||
}
|
||||
|
||||
if bor, ok := s.engine.(*bor.Bor); ok {
|
||||
wallet, err := s.accountManager.Find(accounts.Account{Address: eb})
|
||||
|
|
@ -542,6 +541,7 @@ func (s *Ethereum) StartMining(threads int) error {
|
|||
|
||||
bor.Authorize(eb, wallet.SignData)
|
||||
}
|
||||
}
|
||||
|
||||
// If mining is started, we can disable the transaction rejection mechanism
|
||||
// introduced to speed sync times.
|
||||
|
|
|
|||
|
|
@ -1678,7 +1678,7 @@ func (w *worker) commitWork(ctx context.Context, interrupt *atomic.Int32, noempt
|
|||
}()
|
||||
|
||||
if !noempty && w.interruptCommitFlag {
|
||||
block := w.chain.GetBlockByHash(w.chain.CurrentBlock().TxHash)
|
||||
block := w.chain.GetBlockByHash(w.chain.CurrentBlock().Hash())
|
||||
interruptCtx, stopFn = getInterruptTimer(ctx, work, block)
|
||||
// nolint : staticcheck
|
||||
interruptCtx = vm.PutCache(interruptCtx, w.interruptedTxCache)
|
||||
|
|
|
|||
Loading…
Reference in a new issue