mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-25 22:26:42 +00:00
core/vm: inline docs
This commit is contained in:
parent
243c66833b
commit
b4fff69f72
1 changed files with 4 additions and 2 deletions
|
|
@ -124,10 +124,10 @@ func (evm *EVM) Run(contract *Contract, input []byte) (ret []byte, err error) {
|
||||||
}()
|
}()
|
||||||
|
|
||||||
if glog.V(logger.Debug) {
|
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()
|
tstart := time.Now()
|
||||||
defer func() {
|
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
|
// the operation
|
||||||
if operation.memorySize != nil {
|
if operation.memorySize != nil {
|
||||||
memorySize = operation.memorySize(stack)
|
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))
|
memorySize.Mul(toWordSize(memorySize), big.NewInt(32))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue