diff options
author | obscuren <geffobscura@gmail.com> | 2014-07-12 17:10:47 +0800 |
---|---|---|
committer | obscuren <geffobscura@gmail.com> | 2014-07-12 17:10:47 +0800 |
commit | 54715586ab147a62342a9462f3a73cc2f750d148 (patch) | |
tree | 2e8c35483083d468a153cf6495c2c905e21bddf5 | |
parent | 9010857677ac374e09bab62a89f2fb52c11ed6d3 (diff) | |
download | go-tangerine-54715586ab147a62342a9462f3a73cc2f750d148.tar go-tangerine-54715586ab147a62342a9462f3a73cc2f750d148.tar.gz go-tangerine-54715586ab147a62342a9462f3a73cc2f750d148.tar.bz2 go-tangerine-54715586ab147a62342a9462f3a73cc2f750d148.tar.lz go-tangerine-54715586ab147a62342a9462f3a73cc2f750d148.tar.xz go-tangerine-54715586ab147a62342a9462f3a73cc2f750d148.tar.zst go-tangerine-54715586ab147a62342a9462f3a73cc2f750d148.zip |
Changed sha3 to official one
-rw-r--r-- | ethchain/vm.go | 5 | ||||
-rw-r--r-- | ethcrypto/crypto.go | 2 |
2 files changed, 4 insertions, 3 deletions
diff --git a/ethchain/vm.go b/ethchain/vm.go index 3ad4472ca..f7ce8c2ce 100644 --- a/ethchain/vm.go +++ b/ethchain/vm.go @@ -690,14 +690,15 @@ func (vm *Vm) RunClosure(closure *Closure) (ret []byte, err error) { contract.AddAmount(value) // Set the init script - contract.initScript = mem.Get(offset.Int64(), size.Int64()) + initCode := mem.Get(offset.Int64(), size.Int64()) + //fmt.Printf("%x\n", initCode) // Transfer all remaining gas to the new // contract so it may run the init script gas := new(big.Int).Set(closure.Gas) closure.UseGas(closure.Gas) // Create the closure - c := NewClosure(closure, contract, contract.initScript, vm.state, gas, closure.Price) + c := NewClosure(closure, contract, initCode, vm.state, gas, closure.Price) // Call the closure and set the return value as // main script. contract.script, err = Call(vm, c, nil) diff --git a/ethcrypto/crypto.go b/ethcrypto/crypto.go index b4bb881a0..19f8c9e55 100644 --- a/ethcrypto/crypto.go +++ b/ethcrypto/crypto.go @@ -2,9 +2,9 @@ package ethcrypto import ( "code.google.com/p/go.crypto/ripemd160" + "code.google.com/p/go.crypto/sha3" "crypto/sha256" "github.com/ethereum/eth-go/ethutil" - "github.com/obscuren/sha3" ) func Sha256Bin(data []byte) []byte { |