diff options
author | Péter Szilágyi <peterke@gmail.com> | 2017-08-25 16:00:51 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-08-25 16:00:51 +0800 |
commit | 27a5622e995d762683dd1a79423d83fcf3e62ccf (patch) | |
tree | 49e6fc917ada2c4a5c3be6b96c7f73581d218c69 /core | |
parent | 8596fc59740e3563be5095b0d8c64411331605f0 (diff) | |
parent | b872961ec82ec88a7ac6ef331cfb3eb685ce2c00 (diff) | |
download | dexon-27a5622e995d762683dd1a79423d83fcf3e62ccf.tar dexon-27a5622e995d762683dd1a79423d83fcf3e62ccf.tar.gz dexon-27a5622e995d762683dd1a79423d83fcf3e62ccf.tar.bz2 dexon-27a5622e995d762683dd1a79423d83fcf3e62ccf.tar.lz dexon-27a5622e995d762683dd1a79423d83fcf3e62ccf.tar.xz dexon-27a5622e995d762683dd1a79423d83fcf3e62ccf.tar.zst dexon-27a5622e995d762683dd1a79423d83fcf3e62ccf.zip |
Merge pull request #15028 from karalabe/metropolis-iceage
consensus, core, tests: implement Metropolis EIP 649
Diffstat (limited to 'core')
-rw-r--r-- | core/chain_makers.go | 2 | ||||
-rw-r--r-- | core/vm/logger.go | 8 |
2 files changed, 3 insertions, 7 deletions
diff --git a/core/chain_makers.go b/core/chain_makers.go index cb5825d18..dd3e2fb19 100644 --- a/core/chain_makers.go +++ b/core/chain_makers.go @@ -179,7 +179,7 @@ func GenerateChain(config *params.ChainConfig, parent *types.Block, db ethdb.Dat if gen != nil { gen(i, b) } - ethash.AccumulateRewards(statedb, h, b.uncles) + ethash.AccumulateRewards(config, statedb, h, b.uncles) root, err := statedb.CommitTo(db, config.IsEIP158(h.Number)) if err != nil { panic(fmt.Sprintf("state write error: %v", err)) 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 { |