diff options
author | zelig <viktor.tron@gmail.com> | 2014-06-30 01:30:05 +0800 |
---|---|---|
committer | zelig <viktor.tron@gmail.com> | 2014-06-30 01:30:05 +0800 |
commit | dabaa4cce01586fd8b1b9314073a1d26f35355c8 (patch) | |
tree | fff48b2c62a1d717a7d95ffb99e9eb1d99dbf7bb /ethchain/transaction.go | |
parent | 707d413761927f5ad95298e666e297b820ad0901 (diff) | |
download | go-tangerine-dabaa4cce01586fd8b1b9314073a1d26f35355c8.tar go-tangerine-dabaa4cce01586fd8b1b9314073a1d26f35355c8.tar.gz go-tangerine-dabaa4cce01586fd8b1b9314073a1d26f35355c8.tar.bz2 go-tangerine-dabaa4cce01586fd8b1b9314073a1d26f35355c8.tar.lz go-tangerine-dabaa4cce01586fd8b1b9314073a1d26f35355c8.tar.xz go-tangerine-dabaa4cce01586fd8b1b9314073a1d26f35355c8.tar.zst go-tangerine-dabaa4cce01586fd8b1b9314073a1d26f35355c8.zip |
change all modified calls to ethtrie, ethutil and ethcrypto functions
Diffstat (limited to 'ethchain/transaction.go')
-rw-r--r-- | ethchain/transaction.go | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/ethchain/transaction.go b/ethchain/transaction.go index 2ab681030..11f786b36 100644 --- a/ethchain/transaction.go +++ b/ethchain/transaction.go @@ -3,6 +3,7 @@ package ethchain import ( "bytes" "fmt" + "github.com/ethereum/eth-go/ethcrypto" "github.com/ethereum/eth-go/ethutil" "github.com/obscuren/secp256k1-go" "math/big" @@ -62,7 +63,7 @@ func (self *Transaction) TotalValue() *big.Int { func (tx *Transaction) Hash() []byte { data := []interface{}{tx.Nonce, tx.GasPrice, tx.Gas, tx.Recipient, tx.Value, tx.Data} - return ethutil.Sha3Bin(ethutil.NewValue(data).Encode()) + return ethcrypto.Sha3Bin(ethutil.NewValue(data).Encode()) } func (tx *Transaction) CreatesContract() bool { @@ -75,7 +76,7 @@ func (tx *Transaction) IsContract() bool { } func (tx *Transaction) CreationAddress() []byte { - return ethutil.Sha3Bin(ethutil.NewValue([]interface{}{tx.Sender(), tx.Nonce}).Encode())[12:] + return ethcrypto.Sha3Bin(ethutil.NewValue([]interface{}{tx.Sender(), tx.Nonce}).Encode())[12:] } func (tx *Transaction) Signature(key []byte) []byte { @@ -111,7 +112,7 @@ func (tx *Transaction) Sender() []byte { return nil } - return ethutil.Sha3Bin(pubkey[1:])[12:] + return ethcrypto.Sha3Bin(pubkey[1:])[12:] } func (tx *Transaction) Sign(privk []byte) error { |