swarm/network: always init kad metrics containers

This commit is contained in:
Anton Evangelatov 2018-02-21 12:52:14 +01:00
parent 5af18e3e6b
commit 661eeb74eb

View file

@ -105,10 +105,7 @@ func New(addr Address, params *KadParams) *Kademlia {
buckets: buckets, buckets: buckets,
db: newKadDb(addr, params), db: newKadDb(addr, params),
} }
//if metrics are enabled, initialise the array of counters
if metrics.Enabled {
kad.initMetricsVariables() kad.initMetricsVariables()
}
return kad return kad
} }