From 93a7f324c06321023e2702f7989fdfad32573793 Mon Sep 17 00:00:00 2001 From: Determinant Date: Sat, 19 Sep 2020 22:27:11 -0400 Subject: apply mulit-coin universally --- core/evm.go | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) (limited to 'core/evm.go') diff --git a/core/evm.go b/core/evm.go index 74891d7..78f36e0 100644 --- a/core/evm.go +++ b/core/evm.go @@ -23,7 +23,7 @@ import ( "github.com/ava-labs/coreth/core/types" "github.com/ava-labs/coreth/core/vm" "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/log" + //"github.com/ethereum/go-ethereum/log" ) // ChainContext supports retrieving headers and consensus parameters from the @@ -105,14 +105,6 @@ func CanTransferMC(db vm.StateDB, addr common.Address, to common.Address, coinID if coinID == nil { return 0 } - if !db.IsMultiCoin(addr) { - err := db.EnableMultiCoin(addr) - log.Debug("try to enable MC", "addr", addr.Hex(), "err", err) - } - if !(db.IsMultiCoin(addr) && db.IsMultiCoin(to)) { - // incompatible - return -1 - } if db.GetBalanceMultiCoin(addr, *coinID).Cmp(amount) >= 0 { return 0 } -- cgit v1.2.3