Renamed block_chain to chain_manager

This commit is contained in:
obscuren
2014-10-20 11:53:11 +02:00
parent 33ca8d7b8f
commit 097ba56df5
14 changed files with 77 additions and 113 deletions

View File

@@ -76,16 +76,16 @@ func (self *Filter) SetSkip(skip int) {
func (self *Filter) Find() []*ethstate.Message {
var earliestBlockNo uint64 = uint64(self.earliest)
if self.earliest == -1 {
earliestBlockNo = self.eth.BlockChain().CurrentBlock.Number.Uint64()
earliestBlockNo = self.eth.ChainManager().CurrentBlock.Number.Uint64()
}
var latestBlockNo uint64 = uint64(self.latest)
if self.latest == -1 {
latestBlockNo = self.eth.BlockChain().CurrentBlock.Number.Uint64()
latestBlockNo = self.eth.ChainManager().CurrentBlock.Number.Uint64()
}
var (
messages []*ethstate.Message
block = self.eth.BlockChain().GetBlockByNumber(latestBlockNo)
block = self.eth.ChainManager().GetBlockByNumber(latestBlockNo)
quit bool
)
for i := 0; !quit && block != nil; i++ {
@@ -111,7 +111,7 @@ func (self *Filter) Find() []*ethstate.Message {
messages = append(messages, self.FilterMessages(msgs)...)
}
block = self.eth.BlockChain().GetBlock(block.PrevHash)
block = self.eth.ChainManager().GetBlock(block.PrevHash)
}
skip := int(math.Min(float64(len(messages)), float64(self.skip)))