Skip to content

Commit d3d28c7

Browse files
author
colinlyguo
committed
fix a nil pointer bug
1 parent f5d1710 commit d3d28c7

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

core/tx_pool.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -866,7 +866,7 @@ func (pool *TxPool) add(tx *types.Transaction, local bool) (replaced bool, err e
866866
pool.priced.Put(tx, isLocal)
867867
pool.journalTx(from, tx)
868868
pool.queueTxEvent(tx)
869-
log.Trace("Pooled new executable transaction", "hash", hash.Hex(), "from", from.Hex(), "to", tx.To().Hex())
869+
log.Trace("Pooled new executable transaction", "hash", hash.Hex(), "from", from.Hex(), "to", tx.To())
870870

871871
// Successful promotion, bump the heartbeat
872872
pool.beats[from] = time.Now()
@@ -888,7 +888,7 @@ func (pool *TxPool) add(tx *types.Transaction, local bool) (replaced bool, err e
888888
}
889889
pool.journalTx(from, tx)
890890

891-
log.Trace("Pooled new future transaction", "hash", hash.Hex(), "from", from.Hex(), "to", tx.To().Hex())
891+
log.Trace("Pooled new future transaction", "hash", hash.Hex(), "from", from.Hex(), "to", tx.To())
892892
return replaced, nil
893893
}
894894

@@ -976,7 +976,7 @@ func (pool *TxPool) promoteTx(addr common.Address, hash common.Hash, tx *types.T
976976
// Nothing was replaced, bump the pending counter
977977
pendingGauge.Inc(1)
978978
}
979-
log.Trace("Transaction promoted from future queue to pending", "hash", hash.Hex(), "from", addr.Hex(), "to", tx.To().Hex())
979+
log.Trace("Transaction promoted from future queue to pending", "hash", hash.Hex(), "from", addr.Hex(), "to", tx.To())
980980
// Set the potentially new pending nonce and notify any subsystems of the new tx
981981
pool.pendingNonces.set(addr, tx.Nonce()+1)
982982

0 commit comments

Comments
 (0)