Consensus and bug fixes
* Ensure that each state object has an address that is 20 bytes * Byte logging for vm * changed diff output
This commit is contained in:
@ -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()
|
||||
|
Reference in New Issue
Block a user