Skip to content

Commit 3ee0461

Browse files
committed
Moved ethchain to chain
1 parent 8e0a39f commit 3ee0461

47 files changed

Lines changed: 142 additions & 142 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎block_pool.go‎

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import (
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")
2020
type 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

@@ -262,7 +262,7 @@ out:
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 {
@@ -283,7 +283,7 @@ out:
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 {
File renamed without changes.

ethchain/asm.go renamed to chain/asm.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package ethchain
1+
package chain
22

33
import (
44
"fmt"

ethchain/block.go renamed to chain/block.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package ethchain
1+
package chain
22

33
import (
44
"bytes"

ethchain/bloom.go renamed to chain/bloom.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package ethchain
1+
package chain
22

33
type BloomFilter struct {
44
bin []byte
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package ethchain
1+
package chain
22

33
import (
44
"math/big"
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package ethchain
1+
package chain
22

33
import (
44
"testing"
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package ethchain
1+
package chain
22

33
import "testing"
44

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package ethchain
1+
package chain
22

33
import (
44
"bytes"

‎chain/chain_manager_test.go‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
package chain

0 commit comments

Comments
 (0)