diff options
Diffstat (limited to 'ethchain/transaction.go')
-rw-r--r-- | ethchain/transaction.go | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/ethchain/transaction.go b/ethchain/transaction.go index ae77ee58d..fe11be3bb 100644 --- a/ethchain/transaction.go +++ b/ethchain/transaction.go @@ -66,7 +66,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 ethcrypto.Sha3Bin(ethutil.NewValue(data).Encode()) + return ethcrypto.Sha3(ethutil.NewValue(data).Encode()) } func (tx *Transaction) CreatesContract() bool { @@ -80,9 +80,9 @@ func (tx *Transaction) IsContract() bool { func (tx *Transaction) CreationAddress(state *ethstate.State) []byte { // Generate a new address - addr := ethcrypto.Sha3Bin(ethutil.NewValue([]interface{}{tx.Sender(), tx.Nonce}).Encode())[12:] + addr := ethcrypto.Sha3(ethutil.NewValue([]interface{}{tx.Sender(), tx.Nonce}).Encode())[12:] //for i := uint64(0); state.GetStateObject(addr) != nil; i++ { - // addr = ethcrypto.Sha3Bin(ethutil.NewValue([]interface{}{tx.Sender(), tx.Nonce + i}).Encode())[12:] + // addr = ethcrypto.Sha3(ethutil.NewValue([]interface{}{tx.Sender(), tx.Nonce + i}).Encode())[12:] //} return addr @@ -120,7 +120,7 @@ func (tx *Transaction) Sender() []byte { return nil } - return ethcrypto.Sha3Bin(pubkey[1:])[12:] + return ethcrypto.Sha3(pubkey[1:])[12:] } func (tx *Transaction) Sign(privk []byte) error { |