mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-16 08:53:46 +00:00
try removing byzantine prefetecher to solve goroutine leak
This commit is contained in:
parent
5687bba178
commit
7cb7653a18
1 changed files with 16 additions and 16 deletions
|
|
@ -2340,22 +2340,22 @@ func (bc *BlockChain) insertChain(chain types.Blocks, setHead bool, makeWitness
|
||||||
}
|
}
|
||||||
statedb.SetLogger(bc.logger)
|
statedb.SetLogger(bc.logger)
|
||||||
|
|
||||||
// If we are past Byzantium, enable prefetching to pull in trie node paths
|
// // If we are past Byzantium, enable prefetching to pull in trie node paths
|
||||||
// while processing transactions. Before Byzantium the prefetcher is mostly
|
// // while processing transactions. Before Byzantium the prefetcher is mostly
|
||||||
// useless due to the intermediate root hashing after each transaction.
|
// // useless due to the intermediate root hashing after each transaction.
|
||||||
if bc.chainConfig.IsByzantium(block.Number()) {
|
// if bc.chainConfig.IsByzantium(block.Number()) {
|
||||||
// Generate witnesses either if we're self-testing, or if it's the
|
// // Generate witnesses either if we're self-testing, or if it's the
|
||||||
// only block being inserted. A bit crude, but witnesses are huge,
|
// // only block being inserted. A bit crude, but witnesses are huge,
|
||||||
// so we refuse to make an entire chain of them.
|
// // so we refuse to make an entire chain of them.
|
||||||
if bc.vmConfig.StatelessSelfValidation || (makeWitness && len(chain) == 1) {
|
// if bc.vmConfig.StatelessSelfValidation || (makeWitness && len(chain) == 1) {
|
||||||
witness, err = stateless.NewWitness(block.Header(), bc)
|
// witness, err = stateless.NewWitness(block.Header(), bc)
|
||||||
if err != nil {
|
// if err != nil {
|
||||||
return nil, it.index, err
|
// return nil, it.index, err
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
statedb.StartPrefetcher("chain", witness)
|
// statedb.StartPrefetcher("chain", witness)
|
||||||
}
|
// }
|
||||||
activeState = statedb
|
// activeState = statedb
|
||||||
|
|
||||||
// If we have a followup block, run that against the current state to pre-cache
|
// If we have a followup block, run that against the current state to pre-cache
|
||||||
// transactions and probabilistically some of the account/storage trie nodes.
|
// transactions and probabilistically some of the account/storage trie nodes.
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue