change all modified calls to ethtrie, ethutil and ethcrypto functions

This commit is contained in:
zelig
2014-06-29 18:30:05 +01:00
parent 707d413761
commit dabaa4cce0
14 changed files with 91 additions and 83 deletions

View File

@@ -2,6 +2,7 @@ package ethchain
import (
"fmt"
"github.com/ethereum/eth-go/ethcrypto"
"github.com/ethereum/eth-go/ethlog"
"github.com/ethereum/eth-go/ethutil"
"math"
@@ -398,7 +399,7 @@ func (vm *Vm) RunClosure(closure *Closure, hook DebugHook) (ret []byte, err erro
case SHA3:
require(2)
size, offset := stack.Popn()
data := ethutil.Sha3Bin(mem.Get(offset.Int64(), size.Int64()))
data := ethcrypto.Sha3Bin(mem.Get(offset.Int64(), size.Int64()))
stack.Push(ethutil.BigD(data))
// 0x30 range
@@ -594,7 +595,7 @@ func (vm *Vm) RunClosure(closure *Closure, hook DebugHook) (ret []byte, err erro
snapshot := vm.state.Copy()
// Generate a new address
addr := ethutil.CreateAddress(closure.caller.Address(), closure.caller.N())
addr := ethcrypto.CreateAddress(closure.caller.Address(), closure.caller.N())
vm.Printf(" (*) %x", addr).Endl()