aboutsummaryrefslogtreecommitdiffstats
path: root/ethchain/transaction.go
diff options
context:
space:
mode:
Diffstat (limited to 'ethchain/transaction.go')
-rw-r--r--ethchain/transaction.go5
1 files changed, 4 insertions, 1 deletions
diff --git a/ethchain/transaction.go b/ethchain/transaction.go
index 1a9258201..46f5e7e4c 100644
--- a/ethchain/transaction.go
+++ b/ethchain/transaction.go
@@ -1,11 +1,14 @@
package ethchain
import (
+ "bytes"
"github.com/ethereum/eth-go/ethutil"
"github.com/obscuren/secp256k1-go"
"math/big"
)
+var ContractAddr = []byte{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}
+
type Transaction struct {
Nonce uint64
Recipient []byte
@@ -65,7 +68,7 @@ func (tx *Transaction) Hash() []byte {
}
func (tx *Transaction) IsContract() bool {
- return len(tx.Recipient) == 0
+ return bytes.Compare(tx.Recipient, ContractAddr) == 0
}
func (tx *Transaction) Signature(key []byte) []byte {