aboutsummaryrefslogtreecommitdiffstats
path: root/ethchain/transaction_pool.go
diff options
context:
space:
mode:
authorobscuren <geffobscura@gmail.com>2014-05-21 20:04:25 +0800
committerobscuren <geffobscura@gmail.com>2014-05-21 20:04:25 +0800
commit7fe73deb2d1d52581fb2bdf9d87045427d2fed12 (patch)
treeacd7e552677cb5fb66cf27e481b7377ebc5a2939 /ethchain/transaction_pool.go
parent85793a470605677d860d61d90c5f22ea10e8f84b (diff)
parent8f5eddd0ba9287cfcdc0e1f114c3fb367e54c46c (diff)
downloadgo-tangerine-7fe73deb2d1d52581fb2bdf9d87045427d2fed12.tar
go-tangerine-7fe73deb2d1d52581fb2bdf9d87045427d2fed12.tar.gz
go-tangerine-7fe73deb2d1d52581fb2bdf9d87045427d2fed12.tar.bz2
go-tangerine-7fe73deb2d1d52581fb2bdf9d87045427d2fed12.tar.lz
go-tangerine-7fe73deb2d1d52581fb2bdf9d87045427d2fed12.tar.xz
go-tangerine-7fe73deb2d1d52581fb2bdf9d87045427d2fed12.tar.zst
go-tangerine-7fe73deb2d1d52581fb2bdf9d87045427d2fed12.zip
Merge branch 'release/poc5-rc8'
Diffstat (limited to 'ethchain/transaction_pool.go')
-rw-r--r--ethchain/transaction_pool.go7
1 files changed, 3 insertions, 4 deletions
diff --git a/ethchain/transaction_pool.go b/ethchain/transaction_pool.go
index 796ec7c9a..dcf0c4c31 100644
--- a/ethchain/transaction_pool.go
+++ b/ethchain/transaction_pool.go
@@ -81,8 +81,9 @@ func NewTxPool(ethereum EthManager) *TxPool {
// Blocking function. Don't use directly. Use QueueTransaction instead
func (pool *TxPool) addTransaction(tx *Transaction) {
pool.mutex.Lock()
+ defer pool.mutex.Unlock()
+
pool.pool.PushBack(tx)
- pool.mutex.Unlock()
// Broadcast the transaction to the rest of the peers
pool.Ethereum.Broadcast(ethwire.MsgTxTy, []interface{}{tx.RlpData()})
@@ -182,9 +183,7 @@ out:
// Validate the transaction
err := pool.ValidateTransaction(tx)
if err != nil {
- if ethutil.Config.Debug {
- log.Println("Validating Tx failed", err)
- }
+ ethutil.Config.Log.Debugln("Validating Tx failed", err)
} else {
// Call blocking version.
pool.addTransaction(tx)