From 75dcdbc2b813bf408e854664bbdbbf1a28e5342e Mon Sep 17 00:00:00 2001 From: jmlee Date: Thu, 18 Jul 2019 16:37:15 +0900 Subject: [PATCH] add comments --- core/vm/evm.go | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/core/vm/evm.go b/core/vm/evm.go index 46b02cd130..816397c8c4 100644 --- a/core/vm/evm.go +++ b/core/vm/evm.go @@ -23,6 +23,7 @@ import ( "github.com/eth4nos/go-ethereum/common" "github.com/eth4nos/go-ethereum/crypto" + "github.com/eth4nos/go-ethereum/log" "github.com/eth4nos/go-ethereum/params" ) @@ -224,13 +225,16 @@ func (evm *EVM) Call(caller ContractRef, addr common.Address, input []byte, gas // old version (jmlee) //evm.Transfer(evm.StateDB, caller.Address(), to.Address(), value) // new version (jmlee) - if addr == common.HexToAddress("0x1111111111111111111111111111111111111111") { + if addr == common.HexToAddress("0x0123456789012345678901234567890123456789") { // restoration tx inactiveAddr := common.HexToAddress("0x12345") // temp value for test amount := big.NewInt(12345) // temp value for test evm.StateDB.CreateAccount(inactiveAddr) // get inactive account to state trie evm.Restore(evm.StateDB, inactiveAddr, amount) // restore balance + + // delete input field (merkle proofs) to look like a normal value transfer tx (maybe optional) + //input = []byte{} } else { // value transfer tx evm.Transfer(evm.StateDB, caller.Address(), to.Address(), value) @@ -263,6 +267,10 @@ func (evm *EVM) Call(caller ContractRef, addr common.Address, input []byte, gas contract.UseGas(contract.Gas) } } + + if err == nil { + log.Info("### at evm.Call(): no error occured") // (jmlee) + } return ret, contract.Gas, err }