OSDN Git Service
(root)
/
bytom
/
bytom-spv.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
5b747a9
)
fix #860: remove unused code
author
freewind
<nowindlee@gmail.com>
Mon, 21 May 2018 13:30:47 +0000
(21:30 +0800)
committer
freewind
<nowindlee@gmail.com>
Mon, 21 May 2018 13:30:47 +0000
(21:30 +0800)
netsync/fetcher.go
patch
|
blob
|
history
diff --git
a/netsync/fetcher.go
b/netsync/fetcher.go
index
34aa1ef
..
0fe3e80
100644
(file)
--- a/
netsync/fetcher.go
+++ b/
netsync/fetcher.go
@@
-46,7
+46,6
@@
func NewFetcher(chain *core.Chain, sw *p2p.Switch, peers *peerSet) *Fetcher {
newMinedBlock: make(chan *blockPending),
quit: make(chan struct{}),
queue: prque.New(),
- queues: make(map[string]int),
queued: make(map[bc.Hash]*blockPending),
}
}
@@
-181,10
+180,6
@@
func (f *Fetcher) insert(peerID string, block *types.Block) {
// state.
func (f *Fetcher) forgetBlock(hash bc.Hash) {
if insert := f.queued[hash]; insert != nil {
- f.queues[insert.peerID]--
- if f.queues[insert.peerID] == 0 {
- delete(f.queues, insert.peerID)
- }
delete(f.queued, hash)
}
}