diff options
author | obscuren <geffobscura@gmail.com> | 2014-10-20 17:53:11 +0800 |
---|---|---|
committer | obscuren <geffobscura@gmail.com> | 2014-10-20 17:53:11 +0800 |
commit | 097ba56df59293f9225a8ecdc9e1c43a5ad891bb (patch) | |
tree | 2aba3bb53afd2ff8738c2e71526454917707b7ed /ethchain/state_manager.go | |
parent | 33ca8d7b8f3d4db4b01890e39fa806766fbe8f84 (diff) | |
download | dexon-097ba56df59293f9225a8ecdc9e1c43a5ad891bb.tar dexon-097ba56df59293f9225a8ecdc9e1c43a5ad891bb.tar.gz dexon-097ba56df59293f9225a8ecdc9e1c43a5ad891bb.tar.bz2 dexon-097ba56df59293f9225a8ecdc9e1c43a5ad891bb.tar.lz dexon-097ba56df59293f9225a8ecdc9e1c43a5ad891bb.tar.xz dexon-097ba56df59293f9225a8ecdc9e1c43a5ad891bb.tar.zst dexon-097ba56df59293f9225a8ecdc9e1c43a5ad891bb.zip |
Renamed block_chain to chain_manager
Diffstat (limited to 'ethchain/state_manager.go')
-rw-r--r-- | ethchain/state_manager.go | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/ethchain/state_manager.go b/ethchain/state_manager.go index b71cbe8a1..ed513c9dc 100644 --- a/ethchain/state_manager.go +++ b/ethchain/state_manager.go @@ -33,7 +33,7 @@ type Peer interface { type EthManager interface { StateManager() *StateManager - BlockChain() *BlockChain + ChainManager() *ChainManager TxPool() *TxPool Broadcast(msgType ethwire.MsgType, data []interface{}) PeerCount() int @@ -50,7 +50,7 @@ type StateManager struct { // Mutex for locking the block processor. Blocks can only be handled one at a time mutex sync.Mutex // Canonical block chain - bc *BlockChain + bc *ChainManager // non-persistent key/value memory storage mem map[string]*big.Int // Proof of work used for validating @@ -79,10 +79,10 @@ func NewStateManager(ethereum EthManager) *StateManager { mem: make(map[string]*big.Int), Pow: &EasyPow{}, eth: ethereum, - bc: ethereum.BlockChain(), + bc: ethereum.ChainManager(), } - sm.transState = ethereum.BlockChain().CurrentBlock.State().Copy() - sm.miningState = ethereum.BlockChain().CurrentBlock.State().Copy() + sm.transState = ethereum.ChainManager().CurrentBlock.State().Copy() + sm.miningState = ethereum.ChainManager().CurrentBlock.State().Copy() return sm } @@ -113,7 +113,7 @@ func (self *StateManager) updateThread() { } func (sm *StateManager) CurrentState() *ethstate.State { - return sm.eth.BlockChain().CurrentBlock.State() + return sm.eth.ChainManager().CurrentBlock.State() } func (sm *StateManager) TransState() *ethstate.State { @@ -125,12 +125,12 @@ func (sm *StateManager) MiningState() *ethstate.State { } func (sm *StateManager) NewMiningState() *ethstate.State { - sm.miningState = sm.eth.BlockChain().CurrentBlock.State().Copy() + sm.miningState = sm.eth.ChainManager().CurrentBlock.State().Copy() return sm.miningState } -func (sm *StateManager) BlockChain() *BlockChain { +func (sm *StateManager) ChainManager() *ChainManager { return sm.bc } |