99 "sync"
1010 "time"
1111
12- "github.com/ethereum/go-ethereum/ethchain "
12+ "github.com/ethereum/go-ethereum/chain "
1313 "github.com/ethereum/go-ethereum/ethlog"
1414 "github.com/ethereum/go-ethereum/ethutil"
1515 "github.com/ethereum/go-ethereum/ethwire"
@@ -20,7 +20,7 @@ var poollogger = ethlog.NewLogger("BPOOL")
2020type block struct {
2121 from * Peer
2222 peer * Peer
23- block * ethchain .Block
23+ block * chain .Block
2424 reqAt time.Time
2525 requested int
2626}
@@ -73,7 +73,7 @@ func (self *BlockPool) HasCommonHash(hash []byte) bool {
7373 return self .eth .ChainManager ().GetBlock (hash ) != nil
7474}
7575
76- func (self * BlockPool ) Blocks () (blocks ethchain .Blocks ) {
76+ func (self * BlockPool ) Blocks () (blocks chain .Blocks ) {
7777 for _ , item := range self .pool {
7878 if item .block != nil {
7979 blocks = append (blocks , item .block )
@@ -123,15 +123,15 @@ func (self *BlockPool) AddHash(hash []byte, peer *Peer) {
123123 }
124124}
125125
126- func (self * BlockPool ) Add (b * ethchain .Block , peer * Peer ) {
126+ func (self * BlockPool ) Add (b * chain .Block , peer * Peer ) {
127127 self .addBlock (b , peer , false )
128128}
129129
130- func (self * BlockPool ) AddNew (b * ethchain .Block , peer * Peer ) {
130+ func (self * BlockPool ) AddNew (b * chain .Block , peer * Peer ) {
131131 self .addBlock (b , peer , true )
132132}
133133
134- func (self * BlockPool ) addBlock (b * ethchain .Block , peer * Peer , newBlock bool ) {
134+ func (self * BlockPool ) addBlock (b * chain .Block , peer * Peer , newBlock bool ) {
135135 self .mut .Lock ()
136136 defer self .mut .Unlock ()
137137
262262 /*
263263 if !self.fetchingHashes {
264264 blocks := self.Blocks()
265- ethchain .BlockBy(ethchain .Number).Sort(blocks)
265+ chain .BlockBy(chain .Number).Sort(blocks)
266266
267267 if len(blocks) > 0 {
268268 if !self.eth.ChainManager().HasBlock(b.PrevHash) && self.pool[string(b.PrevHash)] == nil && !self.fetchingHashes {
283283 break out
284284 case <- procTimer .C :
285285 blocks := self .Blocks ()
286- ethchain .BlockBy (ethchain .Number ).Sort (blocks )
286+ chain .BlockBy (chain .Number ).Sort (blocks )
287287
288288 // Find common block
289289 for i , block := range blocks {
0 commit comments