Commit 0c27c5eb authored by obscuren's avatar obscuren

Proper log statement

parent 05e4e972
...@@ -81,8 +81,9 @@ func NewTxPool(ethereum EthManager) *TxPool { ...@@ -81,8 +81,9 @@ func NewTxPool(ethereum EthManager) *TxPool {
// Blocking function. Don't use directly. Use QueueTransaction instead // Blocking function. Don't use directly. Use QueueTransaction instead
func (pool *TxPool) addTransaction(tx *Transaction) { func (pool *TxPool) addTransaction(tx *Transaction) {
pool.mutex.Lock() pool.mutex.Lock()
defer pool.mutex.Unlock()
pool.pool.PushBack(tx) pool.pool.PushBack(tx)
pool.mutex.Unlock()
// Broadcast the transaction to the rest of the peers // Broadcast the transaction to the rest of the peers
pool.Ethereum.Broadcast(ethwire.MsgTxTy, []interface{}{tx.RlpData()}) pool.Ethereum.Broadcast(ethwire.MsgTxTy, []interface{}{tx.RlpData()})
...@@ -182,9 +183,7 @@ out: ...@@ -182,9 +183,7 @@ out:
// Validate the transaction // Validate the transaction
err := pool.ValidateTransaction(tx) err := pool.ValidateTransaction(tx)
if err != nil { if err != nil {
if ethutil.Config.Debug { ethutil.Config.Log.Debugln("Validating Tx failed", err)
log.Println("Validating Tx failed", err)
}
} else { } else {
// Call blocking version. // Call blocking version.
pool.addTransaction(tx) pool.addTransaction(tx)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment