aboutsummaryrefslogtreecommitdiffstats
path: root/les/flowcontrol
diff options
context:
space:
mode:
authorFelföldi Zsolt <zsfelfoldi@gmail.com>2017-08-09 00:31:08 +0800
committerPéter Szilágyi <peterke@gmail.com>2017-08-09 00:31:08 +0800
commitfff6e03a792b0e0a84943e2c3764c39b2840458a (patch)
tree37d811da67038ac2bacdf1b1595a8f867b46eba0 /les/flowcontrol
parentd375193797e8198a82c6a1796064ffb289c6956e (diff)
downloaddexon-fff6e03a792b0e0a84943e2c3764c39b2840458a.tar.gz
dexon-fff6e03a792b0e0a84943e2c3764c39b2840458a.tar.zst
dexon-fff6e03a792b0e0a84943e2c3764c39b2840458a.zip
les: fix megacheck warnings (#14941)
* les: fix megacheck warnings * les: fixed testGetProofs
Diffstat (limited to 'les/flowcontrol')
-rw-r--r--les/flowcontrol/control.go4
1 files changed, 1 insertions, 3 deletions
diff --git a/les/flowcontrol/control.go b/les/flowcontrol/control.go
index e40e69346..d50eb809c 100644
--- a/les/flowcontrol/control.go
+++ b/les/flowcontrol/control.go
@@ -157,9 +157,7 @@ func (peer *ServerNode) QueueRequest(reqID, maxCost uint64) {
peer.bufEstimate -= maxCost
peer.sumCost += maxCost
- if reqID >= 0 {
- peer.pending[reqID] = peer.sumCost
- }
+ peer.pending[reqID] = peer.sumCost
}
// GotReply adjusts estimated buffer value according to the value included in