mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-20 10:52:25 +00:00
Fix txpool nil point exception when add is nil
This commit is contained in:
parent
f7cdea2bdc
commit
cfe566f0e1
1 changed files with 1 additions and 1 deletions
|
|
@ -1057,7 +1057,7 @@ func (pool *TxPool) reset(oldHead, newHead *types.Header) {
|
|||
rem = pool.chain.GetBlock(oldHead.Hash(), oldHead.Number.Uint64())
|
||||
add = pool.chain.GetBlock(newHead.Hash(), newHead.Number.Uint64())
|
||||
)
|
||||
if rem == nil {
|
||||
if rem == nil || add == nil {
|
||||
// This can happen if a setHead is performed, where we simply discard the old
|
||||
// head from the chain.
|
||||
// If that is the case, we don't have the lost transactions any more, and
|
||||
|
|
|
|||
Loading…
Reference in a new issue