diff options
Diffstat (limited to 'ethchain/state_manager.go')
-rw-r--r-- | ethchain/state_manager.go | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/ethchain/state_manager.go b/ethchain/state_manager.go index f3fd92913..a5afa5096 100644 --- a/ethchain/state_manager.go +++ b/ethchain/state_manager.go @@ -66,6 +66,11 @@ type StateManager struct { // Mining state. The mining state is used purely and solely by the mining // operation. miningState *State + + // The last attempted block is mainly used for debugging purposes + // This does not have to be a valid block and will be set during + // 'Process' & canonical validation. + lastAttemptedBlock *Block } func NewStateManager(ethereum EthManager) *StateManager { @@ -165,6 +170,8 @@ func (sm *StateManager) Process(block *Block, dontReact bool) (err error) { return ParentError(block.PrevHash) } + sm.lastAttemptedBlock = block + var ( parent = sm.bc.GetBlock(block.PrevHash) state = parent.State() |