Merge pull request #885 from JukLee0ira/rm_duplicate_func

core: remove the duplicate function `getProcInterrupt()`
This commit is contained in:
Daniel Liu 2025-02-26 14:29:20 +08:00 committed by GitHub
commit 7c9df61bd9
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -258,7 +258,7 @@ func NewBlockChain(db ethdb.Database, cacheConfig *CacheConfig, chainConfig *par
bc.SetProcessor(NewStateProcessor(chainConfig, bc, engine))
var err error
bc.hc, err = NewHeaderChain(db, chainConfig, engine, bc.getProcInterrupt)
bc.hc, err = NewHeaderChain(db, chainConfig, engine, bc.insertStopped)
if err != nil {
return nil, err
}
@ -311,10 +311,6 @@ func NewBlockChainEx(db ethdb.Database, XDCxDb ethdb.XDCxDatabase, cacheConfig *
return blockchain, nil
}
func (bc *BlockChain) getProcInterrupt() bool {
return atomic.LoadInt32(&bc.procInterrupt) == 1
}
func (bc *BlockChain) addXDCxDb(XDCxDb ethdb.XDCxDatabase) {
bc.XDCxDb = XDCxDb
}