aboutsummaryrefslogtreecommitdiffstats
path: root/ethchain/transaction.go
diff options
context:
space:
mode:
authorobscuren <geffobscura@gmail.com>2014-02-19 18:35:17 +0800
committerobscuren <geffobscura@gmail.com>2014-02-19 18:35:17 +0800
commit24f2b2afc3a848190822c382e6aa31c8ab120f07 (patch)
tree827603f276bbcba1240f7f6760df48a0349f0286 /ethchain/transaction.go
parentc866fcc5b37b53e0d11c1fd7e6cb971859537f2c (diff)
downloadgo-tangerine-24f2b2afc3a848190822c382e6aa31c8ab120f07.tar.gz
go-tangerine-24f2b2afc3a848190822c382e6aa31c8ab120f07.tar.zst
go-tangerine-24f2b2afc3a848190822c382e6aa31c8ab120f07.zip
Running contracts fixed
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 {