aboutsummaryrefslogtreecommitdiffstats
path: root/ethchain/transaction.go
diff options
context:
space:
mode:
authorJeffrey Wilcke <obscuren@users.noreply.github.com>2014-07-01 22:16:05 +0800
committerJeffrey Wilcke <obscuren@users.noreply.github.com>2014-07-01 22:16:05 +0800
commit29f613ef84ed39ccc1929dd1069f3576ade889f1 (patch)
tree0c12e6fe9e0214989401bb47a6d4503081fd47bc /ethchain/transaction.go
parent550407b0ec78b7026737d1abe28127da8c0c9063 (diff)
parentff5703fd9b089de67811af61de05637c62dc7a2c (diff)
downloadgo-tangerine-29f613ef84ed39ccc1929dd1069f3576ade889f1.tar
go-tangerine-29f613ef84ed39ccc1929dd1069f3576ade889f1.tar.gz
go-tangerine-29f613ef84ed39ccc1929dd1069f3576ade889f1.tar.bz2
go-tangerine-29f613ef84ed39ccc1929dd1069f3576ade889f1.tar.lz
go-tangerine-29f613ef84ed39ccc1929dd1069f3576ade889f1.tar.xz
go-tangerine-29f613ef84ed39ccc1929dd1069f3576ade889f1.tar.zst
go-tangerine-29f613ef84ed39ccc1929dd1069f3576ade889f1.zip
Merge pull request #28 from ethersphere/feature/keys
Feature/keys
Diffstat (limited to 'ethchain/transaction.go')
-rw-r--r--ethchain/transaction.go7
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 {