diff options
author | obscuren <geffobscura@gmail.com> | 2014-07-10 21:05:06 +0800 |
---|---|---|
committer | obscuren <geffobscura@gmail.com> | 2014-07-10 21:05:06 +0800 |
commit | e504088b79f55dd08749f08f434cb85a0033898f (patch) | |
tree | 16a7d815f796c89f186c9fbfab7a40e3ff4e7500 /ethchain/state_manager.go | |
parent | d52e5f7130b58ec9ead7bb20478919f06b0b1a01 (diff) | |
download | dexon-e504088b79f55dd08749f08f434cb85a0033898f.tar dexon-e504088b79f55dd08749f08f434cb85a0033898f.tar.gz dexon-e504088b79f55dd08749f08f434cb85a0033898f.tar.bz2 dexon-e504088b79f55dd08749f08f434cb85a0033898f.tar.lz dexon-e504088b79f55dd08749f08f434cb85a0033898f.tar.xz dexon-e504088b79f55dd08749f08f434cb85a0033898f.tar.zst dexon-e504088b79f55dd08749f08f434cb85a0033898f.zip |
Consensus and bug fixes
* Ensure that each state object has an address that is 20 bytes
* Byte logging for vm
* changed diff output
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() |