aboutsummaryrefslogtreecommitdiffstats
path: root/peer.go
diff options
context:
space:
mode:
authorobscuren <geffobscura@gmail.com>2014-10-31 17:59:17 +0800
committerobscuren <geffobscura@gmail.com>2014-10-31 17:59:17 +0800
commit3ee0461cb5b6e4a5e2d287180afbdb681805a662 (patch)
treef245667a9e3f5f0ff23bb1c89f4f7cc783f4949c /peer.go
parent8e0a39f33f9d24ebeca9cc88edf24cc6294552d7 (diff)
downloadgo-tangerine-3ee0461cb5b6e4a5e2d287180afbdb681805a662.tar.gz
go-tangerine-3ee0461cb5b6e4a5e2d287180afbdb681805a662.tar.zst
go-tangerine-3ee0461cb5b6e4a5e2d287180afbdb681805a662.zip
Moved ethchain to chain
Diffstat (limited to 'peer.go')
-rw-r--r--peer.go12
1 files changed, 6 insertions, 6 deletions
diff --git a/peer.go b/peer.go
index 31bee1937..ab25e5709 100644
--- a/peer.go
+++ b/peer.go
@@ -12,7 +12,7 @@ import (
"sync/atomic"
"time"
- "github.com/ethereum/go-ethereum/ethchain"
+ "github.com/ethereum/go-ethereum/chain"
"github.com/ethereum/go-ethereum/ethlog"
"github.com/ethereum/go-ethereum/ethutil"
"github.com/ethereum/go-ethereum/ethwire"
@@ -155,7 +155,7 @@ type Peer struct {
pingTime time.Duration
pingStartTime time.Time
- lastRequestedBlock *ethchain.Block
+ lastRequestedBlock *chain.Block
protocolCaps *ethutil.Value
}
@@ -378,7 +378,7 @@ func formatMessage(msg *ethwire.Msg) (ret string) {
case ethwire.MsgPeersTy:
ret += fmt.Sprintf("(%d entries)", msg.Data.Len())
case ethwire.MsgBlockTy:
- b1, b2 := ethchain.NewBlockFromRlpValue(msg.Data.Get(0)), ethchain.NewBlockFromRlpValue(msg.Data.Get(msg.Data.Len()-1))
+ b1, b2 := chain.NewBlockFromRlpValue(msg.Data.Get(0)), ethchain.NewBlockFromRlpValue(msg.Data.Get(msg.Data.Len()-1))
ret += fmt.Sprintf("(%d entries) %x - %x", msg.Data.Len(), b1.Hash()[0:4], b2.Hash()[0:4])
case ethwire.MsgBlockHashesTy:
h1, h2 := msg.Data.Get(0).Bytes(), msg.Data.Get(msg.Data.Len()-1).Bytes()
@@ -429,7 +429,7 @@ func (p *Peer) HandleInbound() {
// in the TxPool where it will undergo validation and
// processing when a new block is found
for i := 0; i < msg.Data.Len(); i++ {
- tx := ethchain.NewTransactionFromValue(msg.Data.Get(i))
+ tx := chain.NewTransactionFromValue(msg.Data.Get(i))
p.ethereum.TxPool().QueueTransaction(tx)
}
case ethwire.MsgGetPeersTy:
@@ -535,7 +535,7 @@ func (p *Peer) HandleInbound() {
it := msg.Data.NewIterator()
for it.Next() {
- block := ethchain.NewBlockFromRlpValue(it.Value())
+ block := chain.NewBlockFromRlpValue(it.Value())
blockPool.Add(block, p)
p.lastBlockReceived = time.Now()
@@ -543,7 +543,7 @@ func (p *Peer) HandleInbound() {
case ethwire.MsgNewBlockTy:
var (
blockPool = p.ethereum.blockPool
- block = ethchain.NewBlockFromRlpValue(msg.Data.Get(0))
+ block = chain.NewBlockFromRlpValue(msg.Data.Get(0))
td = msg.Data.Get(1).BigInt()
)