diff options
author | obscuren <geffobscura@gmail.com> | 2014-11-18 23:58:22 +0800 |
---|---|---|
committer | obscuren <geffobscura@gmail.com> | 2014-11-18 23:58:22 +0800 |
commit | a1b6a9ac29d0aa8d29a2c0535bafdb5fe4d4830b (patch) | |
tree | aee891c8f02591e16377a6bf047c13f12d6d5123 /peer.go | |
parent | 62cd9946ee16758a4e368cd0b5a0ba9fa4d94705 (diff) | |
download | go-tangerine-a1b6a9ac29d0aa8d29a2c0535bafdb5fe4d4830b.tar go-tangerine-a1b6a9ac29d0aa8d29a2c0535bafdb5fe4d4830b.tar.gz go-tangerine-a1b6a9ac29d0aa8d29a2c0535bafdb5fe4d4830b.tar.bz2 go-tangerine-a1b6a9ac29d0aa8d29a2c0535bafdb5fe4d4830b.tar.lz go-tangerine-a1b6a9ac29d0aa8d29a2c0535bafdb5fe4d4830b.tar.xz go-tangerine-a1b6a9ac29d0aa8d29a2c0535bafdb5fe4d4830b.tar.zst go-tangerine-a1b6a9ac29d0aa8d29a2c0535bafdb5fe4d4830b.zip |
Begin of moving objects to types package
* Block(s)
* Transaction(s)
Diffstat (limited to 'peer.go')
-rw-r--r-- | peer.go | 11 |
1 files changed, 5 insertions, 6 deletions
@@ -11,8 +11,7 @@ import ( "strings" "sync/atomic" "time" - - "github.com/ethereum/go-ethereum/chain" + "github.com/ethereum/go-ethereum/chain/types" "github.com/ethereum/go-ethereum/ethutil" "github.com/ethereum/go-ethereum/logger" "github.com/ethereum/go-ethereum/wire" @@ -155,7 +154,7 @@ type Peer struct { pingTime time.Duration pingStartTime time.Time - lastRequestedBlock *chain.Block + lastRequestedBlock *types.Block protocolCaps *ethutil.Value } @@ -429,7 +428,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 := chain.NewTransactionFromValue(msg.Data.Get(i)) + tx := types.NewTransactionFromValue(msg.Data.Get(i)) p.ethereum.TxPool().QueueTransaction(tx) } case wire.MsgGetPeersTy: @@ -535,7 +534,7 @@ func (p *Peer) HandleInbound() { it := msg.Data.NewIterator() for it.Next() { - block := chain.NewBlockFromRlpValue(it.Value()) + block := types.NewBlockFromRlpValue(it.Value()) blockPool.Add(block, p) p.lastBlockReceived = time.Now() @@ -543,7 +542,7 @@ func (p *Peer) HandleInbound() { case wire.MsgNewBlockTy: var ( blockPool = p.ethereum.blockPool - block = chain.NewBlockFromRlpValue(msg.Data.Get(0)) + block = types.NewBlockFromRlpValue(msg.Data.Get(0)) td = msg.Data.Get(1).BigInt() ) |