From ec9b582fe1fe5be1d196277f56f88163a61226d1 Mon Sep 17 00:00:00 2001 From: Jeffrey Wilcke Date: Tue, 4 Oct 2016 13:12:26 +0200 Subject: [PATCH] stuff --- core/state/statedb.go | 4 ++++ core/state_processor.go | 5 ++++- tests/block_test_util.go | 2 +- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/core/state/statedb.go b/core/state/statedb.go index 00e95867c2..8017d50d65 100644 --- a/core/state/statedb.go +++ b/core/state/statedb.go @@ -624,6 +624,10 @@ func Reduce(s *StateDB) *StateDB { } else { state.SetStateObject(object) } + + if _, isDirty := s.stateObjectsDirty[address]; isDirty { + state.stateObjectsDirty[address] = struct{}{} + } } state.logs = append(state.logs, s.logs...) diff --git a/core/state_processor.go b/core/state_processor.go index 11cc7fbe6b..4c308d12a5 100644 --- a/core/state_processor.go +++ b/core/state_processor.go @@ -84,8 +84,11 @@ func (p *StateProcessor) Process(block *types.Block, statedb *state.StateDB, cfg forkState = state.Fork(txPostState) } + //fmt.Printf("before %x\n", state.IntermediateRoot(state.Reduce(forkState))) + //fmt.Println(string(forkState.Dump())) AccumulateRewards(forkState, header, block.Uncles()) - + //fmt.Println(string(forkState.Dump())) + //fmt.Printf("after %x\n", state.IntermediateRoot(state.Reduce(forkState))) statedb.Set(state.Reduce(forkState)) return receipts, allLogs, totalUsedGas, err diff --git a/tests/block_test_util.go b/tests/block_test_util.go index 4119f5372d..04831b4f32 100644 --- a/tests/block_test_util.go +++ b/tests/block_test_util.go @@ -144,7 +144,7 @@ func runBlockTests(homesteadBlock, daoForkBlock *big.Int, bt map[string]*BlockTe } for name, test := range bt { - if skipTest[name] { + if skipTest[name] || name != "OOGStateCopyContainingDeletedContract" { glog.Infoln("Skipping block test", name) continue }