aboutsummaryrefslogtreecommitdiffstats
path: root/ethchain
diff options
context:
space:
mode:
authorobscuren <geffobscura@gmail.com>2014-06-12 16:07:27 +0800
committerobscuren <geffobscura@gmail.com>2014-06-12 16:07:27 +0800
commit3a9d7d318abb3cd01ecd012ae85da5e586436d65 (patch)
tree833c5e876a1494d9abd79f01e58513ec1c51dfff /ethchain
parent1938bfcddfd2722880a692c59cad344b611711c8 (diff)
downloadgo-tangerine-3a9d7d318abb3cd01ecd012ae85da5e586436d65.tar
go-tangerine-3a9d7d318abb3cd01ecd012ae85da5e586436d65.tar.gz
go-tangerine-3a9d7d318abb3cd01ecd012ae85da5e586436d65.tar.bz2
go-tangerine-3a9d7d318abb3cd01ecd012ae85da5e586436d65.tar.lz
go-tangerine-3a9d7d318abb3cd01ecd012ae85da5e586436d65.tar.xz
go-tangerine-3a9d7d318abb3cd01ecd012ae85da5e586436d65.tar.zst
go-tangerine-3a9d7d318abb3cd01ecd012ae85da5e586436d65.zip
log changes
Diffstat (limited to 'ethchain')
-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 d4175d973..103c305fe 100644
--- a/ethchain/transaction_pool.go
+++ b/ethchain/transaction_pool.go
@@ -162,6 +162,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())
@@ -207,6 +211,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)
}