aboutsummaryrefslogtreecommitdiffstats
path: root/core/transaction_pool.go
diff options
context:
space:
mode:
Diffstat (limited to 'core/transaction_pool.go')
-rw-r--r--core/transaction_pool.go10
1 files changed, 9 insertions, 1 deletions
diff --git a/core/transaction_pool.go b/core/transaction_pool.go
index 3349c9441..fa284e52d 100644
--- a/core/transaction_pool.go
+++ b/core/transaction_pool.go
@@ -4,6 +4,7 @@ import (
"fmt"
"github.com/ethereum/go-ethereum/core/types"
+ "github.com/ethereum/go-ethereum/ethutil"
"github.com/ethereum/go-ethereum/event"
"github.com/ethereum/go-ethereum/logger"
"gopkg.in/fatih/set.v0"
@@ -107,7 +108,14 @@ func (self *TxPool) Add(tx *types.Transaction) error {
self.addTransaction(tx)
- txplogger.Debugf("(t) %x => %x (%v) %x\n", tx.From()[:4], tx.To()[:4], tx.Value, tx.Hash())
+ var to string
+ if len(tx.To()) > 0 {
+ to = ethutil.Bytes2Hex(tx.To()[:4])
+ } else {
+ to = "[NEW_CONTRACT]"
+ }
+
+ txplogger.Debugf("(t) %x => %s (%v) %x\n", tx.From()[:4], to, tx.Value, tx.Hash())
// Notify the subscribers
go self.eventMux.Post(TxPreEvent{tx})