Skip to content

Commit

Permalink
core/txpool/legacypool: prevent crash due to nil deref
Browse files Browse the repository at this point in the history
  • Loading branch information
holiman committed Oct 11, 2024
1 parent 75810da commit a7cf6e5
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion core/txpool/legacypool/tx_tracker.go
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,9 @@ func (tracker *TxTracker) TrackAll(txs []*types.Transaction) {
tracker.byAddr[addr] = newSortedMap()
}
tracker.byAddr[addr].Put(tx)
_ = tracker.journal.insert(tx)
if tracker.journal != nil {
_ = tracker.journal.insert(tx)
}
}
}

Expand Down

0 comments on commit a7cf6e5

Please sign in to comment.