From 9faecc847b803e248a5b4d3d256a90b6c55fd26f Mon Sep 17 00:00:00 2001 From: Jhih-Ming Huang Date: Fri, 8 Mar 2019 20:25:54 +0800 Subject: remove dexon/crypto/sha3 pkg. --- core/vm/evm/oracle_contracts.go | 4 ++-- core/vm/tools/transaction.go | 5 +++-- 2 files changed, 5 insertions(+), 4 deletions(-) (limited to 'core/vm') diff --git a/core/vm/evm/oracle_contracts.go b/core/vm/evm/oracle_contracts.go index 4a13198e2..29a1b1621 100644 --- a/core/vm/evm/oracle_contracts.go +++ b/core/vm/evm/oracle_contracts.go @@ -1736,7 +1736,7 @@ func (g *GovernanceContract) register( } caller := g.contract.Caller() - value := g.contract.Value() + value := g.contract.Value offset := g.state.NodesOffsetByAddress(caller) // Can not register if already registered. @@ -1782,7 +1782,7 @@ func (g *GovernanceContract) register( func (g *GovernanceContract) stake() ([]byte, error) { caller := g.contract.Caller() - value := g.contract.Value() + value := g.contract.Value if big.NewInt(0).Cmp(value) == 0 { return nil, errExecutionReverted diff --git a/core/vm/tools/transaction.go b/core/vm/tools/transaction.go index 1ff36a36e..4a230f443 100644 --- a/core/vm/tools/transaction.go +++ b/core/vm/tools/transaction.go @@ -8,10 +8,11 @@ import ( "math/big" "sync/atomic" + "golang.org/x/crypto/sha3" + "github.com/dexon-foundation/dexon/common" "github.com/dexon-foundation/dexon/common/hexutil" "github.com/dexon-foundation/dexon/crypto" - "github.com/dexon-foundation/dexon/crypto/sha3" "github.com/dexon-foundation/dexon/rlp" ) @@ -248,7 +249,7 @@ func (tx *Transaction) Hash() common.Hash { return v } func rlpHash(x interface{}) (h common.Hash) { - hw := sha3.NewKeccak256() + hw := sha3.NewLegacyKeccak256() rlp.Encode(hw, x) hw.Sum(h[:0]) return h -- cgit v1.2.3