mirror of
https://gitlab.com/pulsechaincom/erigon-pulse.git
synced 2024-12-22 11:41:19 +00:00
Fix panic in isAgra check for txpool (#8562)
Fixes a nil pointer panic in the isagra check when running on an empty chain db. In this case the block will return as nil with no error.
This commit is contained in:
parent
a54939633e
commit
047197e24c
@ -915,7 +915,7 @@ func (p *TxPool) isAgra() bool {
|
||||
defer tx.Rollback()
|
||||
|
||||
head_block, err := chain.CurrentBlockNumber(tx)
|
||||
if err != nil {
|
||||
if head_block == nil || err != nil {
|
||||
return false
|
||||
}
|
||||
// A new block is built on top of the head block, so when the head is agraBlock-1,
|
||||
|
Loading…
Reference in New Issue
Block a user