diff options
author | Péter Szilágyi <peterke@gmail.com> | 2017-08-24 17:26:06 +0800 |
---|---|---|
committer | Péter Szilágyi <peterke@gmail.com> | 2017-08-24 22:16:39 +0800 |
commit | b872961ec82ec88a7ac6ef331cfb3eb685ce2c00 (patch) | |
tree | 652d5bc27e4f95809637e6f76f6db3162b2e435e /core/vm | |
parent | 3c48a25762dfab9382791c33a2f5832466077ac3 (diff) | |
download | dexon-b872961ec82ec88a7ac6ef331cfb3eb685ce2c00.tar.gz dexon-b872961ec82ec88a7ac6ef331cfb3eb685ce2c00.tar.zst dexon-b872961ec82ec88a7ac6ef331cfb3eb685ce2c00.zip |
consensus, core, tests: implement Metropolis EIP 649
Diffstat (limited to 'core/vm')
-rw-r--r-- | core/vm/logger.go | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/core/vm/logger.go b/core/vm/logger.go index 5ada310f0..623c0d563 100644 --- a/core/vm/logger.go +++ b/core/vm/logger.go @@ -128,18 +128,14 @@ func (l *StructLogger) CaptureState(env *EVM, pc uint64, op OpCode, gas, cost ui } // capture SSTORE opcodes and determine the changed value and store - // it in the local storage container. NOTE: we do not need to do any - // range checks here because that's already handler prior to calling - // this function. - switch op { - case SSTORE: + // it in the local storage container. + if op == SSTORE && stack.len() >= 2 { var ( value = common.BigToHash(stack.data[stack.len()-2]) address = common.BigToHash(stack.data[stack.len()-1]) ) l.changedValues[contract.Address()][address] = value } - // copy a snapstot of the current memory state to a new buffer var mem []byte if !l.cfg.DisableMemory { |