diff options
author | obscuren <geffobscura@gmail.com> | 2014-09-14 18:02:35 +0800 |
---|---|---|
committer | obscuren <geffobscura@gmail.com> | 2014-09-14 18:02:35 +0800 |
commit | 954ba211bf8ee63872b5e4d20b6aafb4400507c6 (patch) | |
tree | 04721a6df7c5bf1704fc9c203b04e3112acf5fdc | |
parent | 4b4830692a0e17b26338da75c6ab96f6bb4e14b1 (diff) | |
download | go-tangerine-954ba211bf8ee63872b5e4d20b6aafb4400507c6.tar go-tangerine-954ba211bf8ee63872b5e4d20b6aafb4400507c6.tar.gz go-tangerine-954ba211bf8ee63872b5e4d20b6aafb4400507c6.tar.bz2 go-tangerine-954ba211bf8ee63872b5e4d20b6aafb4400507c6.tar.lz go-tangerine-954ba211bf8ee63872b5e4d20b6aafb4400507c6.tar.xz go-tangerine-954ba211bf8ee63872b5e4d20b6aafb4400507c6.tar.zst go-tangerine-954ba211bf8ee63872b5e4d20b6aafb4400507c6.zip |
Fixed contract validation address in tx pool
-rw-r--r-- | ethchain/transaction_pool.go | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/ethchain/transaction_pool.go b/ethchain/transaction_pool.go index bd8b27a6d..9a6322432 100644 --- a/ethchain/transaction_pool.go +++ b/ethchain/transaction_pool.go @@ -99,7 +99,7 @@ func (pool *TxPool) ValidateTransaction(tx *Transaction) error { return fmt.Errorf("[TXPL] No last block on the block chain") } - if len(tx.Recipient) != 20 { + if len(tx.Recipient) != 0 && len(tx.Recipient) != 20 { return fmt.Errorf("[TXPL] Invalid recipient. len = %d", len(tx.Recipient)) } @@ -148,7 +148,10 @@ out: // Call blocking version. pool.addTransaction(tx) - txplogger.Debugf("(t) %x => %x (%v) %x\n", tx.Sender()[:4], tx.Recipient[:4], tx.Value, tx.Hash()) + tmp := make([]byte, 4) + copy(tmp, tx.Recipient) + + txplogger.Debugf("(t) %x => %x (%v) %x\n", tx.Sender()[:4], tmp, tx.Value, tx.Hash()) // Notify the subscribers pool.Ethereum.Reactor().Post("newTx:pre", tx) |