From b4fff69f72919c9c2137a36973c3b6f0b1266c86 Mon Sep 17 00:00:00 2001 From: Jeffrey Wilcke Date: Sat, 3 Dec 2016 11:07:49 +0100 Subject: [PATCH] core/vm: inline docs --- core/vm/vm.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/core/vm/vm.go b/core/vm/vm.go index f49665723c..cb9fabbdf5 100644 --- a/core/vm/vm.go +++ b/core/vm/vm.go @@ -124,10 +124,10 @@ func (evm *EVM) Run(contract *Contract, input []byte) (ret []byte, err error) { }() if glog.V(logger.Debug) { - glog.Infof("running byte VM %x\n", codehash[:4]) + glog.Infof("evm running: %x\n", codehash[:4]) tstart := time.Now() defer func() { - glog.Infof("byte VM %x done. time: %v\n", codehash[:4], time.Since(tstart)) + glog.Infof("evm done: %x. time: %v\n", codehash[:4], time.Since(tstart)) }() } @@ -158,6 +158,8 @@ func (evm *EVM) Run(contract *Contract, input []byte) (ret []byte, err error) { // the operation if operation.memorySize != nil { memorySize = operation.memorySize(stack) + // memory is expanded in words of 32 bytes. Gas + // is also calculated in words. memorySize.Mul(toWordSize(memorySize), big.NewInt(32)) }