diff --git a/Godeps/_workspace/src/github.com/tendermint/tendermint/vm/vm.go b/Godeps/_workspace/src/github.com/tendermint/tendermint/vm/vm.go index 180b84f44eedac6f02d916cdc41e988d361fbbe4..f79a3d28734bc69ceaa0a8139d52fb2ad1b5d633 100644 --- a/Godeps/_workspace/src/github.com/tendermint/tendermint/vm/vm.go +++ b/Godeps/_workspace/src/github.com/tendermint/tendermint/vm/vm.go @@ -147,18 +147,16 @@ func (vm *VM) Call(caller, callee *Account, code, input []byte, value int64, gas return } - -// [This implementation is up for review]. // DelegateCall is executed by the DELEGATECALL opcode, introduced as off Ethereum Homestead. // The intent of delegate call is to run the code of the callee in the storage context of the caller; // while preserving the original caller to the previous callee. -// [ -->] Different to the normal CALL or CALLCODE, the value does not need to be transferred to the callee. [<-- CORRECT?] +// Different to the normal CALL or CALLCODE, the value does not need to be transferred to the callee. func (vm *VM) DelegateCall(caller, callee *Account, code, input []byte, value int64, gas *int64) (output []byte, err error) { - + exception := new(string) // fire the post call event (including exception if applicable) defer vm.fireCallEvent(exception, &output, caller, callee, input, value, gas) - + // DelegateCall does not transfer the value to the callee. if len(code) > 0 { @@ -781,11 +779,11 @@ func (vm *VM) call(caller, callee *Account, code, input []byte, value int64, gas // caller, as such it is not stored on stack for the address // to be called; for CALL and CALLCODE value is stored on stack // and needs to be overwritten from the given value. - // TODO: [ben] assert that malicious code cannot produce + // TODO: [ben] assert that malicious code cannot produce // new value. if op != DELEGATECALL { value = stack.Pop64() - } + } inOffset, inSize := stack.Pop64(), stack.Pop64() // inputs retOffset, retSize := stack.Pop64(), stack.Pop64() // outputs dbg.Printf(" => %X\n", addr)