aboutsummaryrefslogtreecommitdiffstats
path: root/ethchain/transaction_pool.go
diff options
context:
space:
mode:
authorobscuren <geffobscura@gmail.com>2014-06-12 16:07:40 +0800
committerobscuren <geffobscura@gmail.com>2014-06-12 16:07:40 +0800
commit6593c6942454233f61d7d74f030a9075a84807cd (patch)
tree13ce91005e853412a88ae7a17ef5641559631744 /ethchain/transaction_pool.go
parent8a2e50ab2a6c903a6ab3ab10a74c37e1f3b8f3f1 (diff)
parent3a9d7d318abb3cd01ecd012ae85da5e586436d65 (diff)
downloaddexon-6593c6942454233f61d7d74f030a9075a84807cd.tar
dexon-6593c6942454233f61d7d74f030a9075a84807cd.tar.gz
dexon-6593c6942454233f61d7d74f030a9075a84807cd.tar.bz2
dexon-6593c6942454233f61d7d74f030a9075a84807cd.tar.lz
dexon-6593c6942454233f61d7d74f030a9075a84807cd.tar.xz
dexon-6593c6942454233f61d7d74f030a9075a84807cd.tar.zst
dexon-6593c6942454233f61d7d74f030a9075a84807cd.zip
Merge branch 'develop' into interop
Diffstat (limited to 'ethchain/transaction_pool.go')
-rw-r--r--ethchain/transaction_pool.go6
1 files changed, 6 insertions, 0 deletions
diff --git a/ethchain/transaction_pool.go b/ethchain/transaction_pool.go
index 6220f29a3..52c850ba3 100644
--- a/ethchain/transaction_pool.go
+++ b/ethchain/transaction_pool.go
@@ -171,6 +171,10 @@ func (pool *TxPool) ValidateTransaction(tx *Transaction) error {
return errors.New("[TXPL] No last block on the block chain")
}
+ if len(tx.Recipient) != 20 {
+ return fmt.Errorf("[TXPL] Invalid recipient. len = %d", len(tx.Recipient))
+ }
+
// Get the sender
//sender := pool.Ethereum.StateManager().procState.GetAccount(tx.Sender())
sender := pool.Ethereum.StateManager().CurrentState().GetAccount(tx.Sender())
@@ -216,6 +220,8 @@ out:
// Call blocking version.
pool.addTransaction(tx)
+ ethutil.Config.Log.Debugf("%x => %x (%v) %x\n", tx.Sender()[:4], tx.Recipient[:4], tx.Value, tx.Hash())
+
// Notify the subscribers
pool.Ethereum.Reactor().Post("newTx:pre", tx)
}