From 888546725e0ec15675529470fe11453deba60687 Mon Sep 17 00:00:00 2001 From: Martin Holst Swende Date: Thu, 10 Oct 2024 09:43:37 +0200 Subject: [PATCH] core/txpool/tracking: fix nil deref --- core/txpool/tracking/tx_tracker.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/core/txpool/tracking/tx_tracker.go b/core/txpool/tracking/tx_tracker.go index a4c2602a45..cfe75a658e 100644 --- a/core/txpool/tracking/tx_tracker.go +++ b/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].Put(tx) - _ = tracker.journal.insert(tx) + if tracker.journal != nil { + _ = tracker.journal.insert(tx) + } } }