aboutsummaryrefslogtreecommitdiffstats
path: root/eth/downloader/statesync.go
diff options
context:
space:
mode:
authorNick Johnson <arachnid@notdot.net>2017-06-28 20:25:08 +0800
committerNick Johnson <arachnid@notdot.net>2017-06-29 19:49:18 +0800
commitae11545bc5fc0fcf4340d9f33d488eaf81d8bb2d (patch)
tree6ed575d314c8781e8e258a63a8c2d88753f896a1 /eth/downloader/statesync.go
parent055095798911e3c6f2e210220cb7ece1b71f6517 (diff)
downloadgo-tangerine-ae11545bc5fc0fcf4340d9f33d488eaf81d8bb2d.tar
go-tangerine-ae11545bc5fc0fcf4340d9f33d488eaf81d8bb2d.tar.gz
go-tangerine-ae11545bc5fc0fcf4340d9f33d488eaf81d8bb2d.tar.bz2
go-tangerine-ae11545bc5fc0fcf4340d9f33d488eaf81d8bb2d.tar.lz
go-tangerine-ae11545bc5fc0fcf4340d9f33d488eaf81d8bb2d.tar.xz
go-tangerine-ae11545bc5fc0fcf4340d9f33d488eaf81d8bb2d.tar.zst
go-tangerine-ae11545bc5fc0fcf4340d9f33d488eaf81d8bb2d.zip
eth, les: Refactor downloader peer to use structs
Diffstat (limited to 'eth/downloader/statesync.go')
-rw-r--r--eth/downloader/statesync.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/eth/downloader/statesync.go b/eth/downloader/statesync.go
index 4e6612039..a5ce8c42d 100644
--- a/eth/downloader/statesync.go
+++ b/eth/downloader/statesync.go
@@ -37,7 +37,7 @@ type stateReq struct {
tasks map[common.Hash]*stateTask // Download tasks to track previous attempts
timeout time.Duration // Maximum round trip time for this to complete
timer *time.Timer // Timer to fire when the RTT timeout expires
- peer *peer // Peer that we're requesting from
+ peer *peerConnection // Peer that we're requesting from
response [][]byte // Response data of the peer (nil for timeouts)
}
@@ -246,7 +246,7 @@ func (s *stateSync) Cancel() error {
// and timeouts.
func (s *stateSync) loop() error {
// Listen for new peer events to assign tasks to them
- newPeer := make(chan *peer, 1024)
+ newPeer := make(chan *peerConnection, 1024)
peerSub := s.d.peers.SubscribeNewPeers(newPeer)
defer peerSub.Unsubscribe()