diff --git a/core/tx_pool.go b/core/tx_pool.go index 5d37fcffc0..44e0db8d36 100644 --- a/core/tx_pool.go +++ b/core/tx_pool.go @@ -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