mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-05-18 13:59:26 +00:00
core: remove unused code (#29381)
This commit is contained in:
parent
7aba6511b0
commit
3b77e0ff4b
1 changed files with 0 additions and 11 deletions
|
|
@ -1552,17 +1552,6 @@ func (bc *BlockChain) writeBlockWithState(block *types.Block, receipts []*types.
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
// WriteBlockAndSetHead writes the given block and all associated state to the database,
|
|
||||||
// and applies the block as the new chain head.
|
|
||||||
func (bc *BlockChain) WriteBlockAndSetHead(block *types.Block, receipts []*types.Receipt, logs []*types.Log, state *state.StateDB, emitHeadEvent bool) (status WriteStatus, err error) {
|
|
||||||
if !bc.chainmu.TryLock() {
|
|
||||||
return NonStatTy, errChainStopped
|
|
||||||
}
|
|
||||||
defer bc.chainmu.Unlock()
|
|
||||||
|
|
||||||
return bc.writeBlockAndSetHead(block, receipts, logs, state, emitHeadEvent)
|
|
||||||
}
|
|
||||||
|
|
||||||
// writeBlockAndSetHead is the internal implementation of WriteBlockAndSetHead.
|
// writeBlockAndSetHead is the internal implementation of WriteBlockAndSetHead.
|
||||||
// This function expects the chain mutex to be held.
|
// This function expects the chain mutex to be held.
|
||||||
func (bc *BlockChain) writeBlockAndSetHead(block *types.Block, receipts []*types.Receipt, logs []*types.Log, state *state.StateDB, emitHeadEvent bool) (status WriteStatus, err error) {
|
func (bc *BlockChain) writeBlockAndSetHead(block *types.Block, receipts []*types.Receipt, logs []*types.Log, state *state.StateDB, emitHeadEvent bool) (status WriteStatus, err error) {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue