mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-18 01:43:47 +00:00
swarm/network: off-by-one index in metrics containers
This commit is contained in:
parent
661eeb74eb
commit
13aa42e0b4
1 changed files with 1 additions and 1 deletions
|
|
@ -448,7 +448,7 @@ func (self *Kademlia) initMetricsVariables() {
|
|||
bucketAddIndexCount = make([]gometrics.Counter, self.MaxProx+1)
|
||||
bucketRmIndexCount = make([]gometrics.Counter, self.MaxProx+1)
|
||||
//at each index create a metrics counter
|
||||
for i := 0; i < (self.KadParams.MaxProx); i++ {
|
||||
for i := 0; i < (self.KadParams.MaxProx + 1); i++ {
|
||||
bucketAddIndexCount[i] = metrics.NewCounter(fmt.Sprintf("network.kademlia.bucket.add.%d.index", i))
|
||||
bucketRmIndexCount[i] = metrics.NewCounter(fmt.Sprintf("network.kademlia.bucket.rm.%d.index", i))
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue