aboutsummaryrefslogtreecommitdiffstats
path: root/ethchain/transaction.go
diff options
context:
space:
mode:
Diffstat (limited to 'ethchain/transaction.go')
-rw-r--r--ethchain/transaction.go8
1 files changed, 6 insertions, 2 deletions
diff --git a/ethchain/transaction.go b/ethchain/transaction.go
index 3d52e4f73..34ab357a1 100644
--- a/ethchain/transaction.go
+++ b/ethchain/transaction.go
@@ -10,6 +10,10 @@ import (
var ContractAddr = []byte{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}
+func IsContractAddr(addr []byte) bool {
+ return bytes.Compare(addr, ContractAddr) == 0
+}
+
type Transaction struct {
Nonce uint64
Recipient []byte
@@ -65,7 +69,7 @@ func (tx *Transaction) CreatesContract() bool {
return tx.contractCreation
}
-/* Depricated */
+/* Deprecated */
func (tx *Transaction) IsContract() bool {
return tx.CreatesContract()
}
@@ -149,7 +153,7 @@ func (tx *Transaction) RlpValueDecode(decoder *ethutil.Value) {
tx.r = decoder.Get(7).Bytes()
tx.s = decoder.Get(8).Bytes()
- if bytes.Compare(tx.Recipient, ContractAddr) == 0 {
+ if IsContractAddr(tx.Recipient) {
tx.contractCreation = true
}
}