core/txpool/tracking: fix nil deref

pull/30559/head
Martin Holst Swende 1 month ago
parent 82823fba6f
commit 888546725e
No known key found for this signature in database
GPG Key ID: 683B438C05A5DDF0
  1. 4
      core/txpool/tracking/tx_tracker.go

@ -90,7 +90,9 @@ func (tracker *TxTracker) TrackAll(txs []*types.Transaction) {
tracker.byAddr[addr] = legacypool.NewSortedMap() tracker.byAddr[addr] = legacypool.NewSortedMap()
} }
tracker.byAddr[addr].Put(tx) tracker.byAddr[addr].Put(tx)
_ = tracker.journal.insert(tx) if tracker.journal != nil {
_ = tracker.journal.insert(tx)
}
} }
} }

Loading…
Cancel
Save