mirror of https://github.com/status-im/nim-eth.git
Change invalid distance warning to debug (#316)
And also: * move connected_peers metric so it does get added where it shouldn't. * imports cleanup
This commit is contained in:
parent
3b15abab10
commit
d024ea8e85
|
@ -47,6 +47,3 @@ proc ignoreSignalsInThread*() =
|
||||||
if pthread_sigmask(SIG_BLOCK, signalMask, oldSignalMask) != 0:
|
if pthread_sigmask(SIG_BLOCK, signalMask, oldSignalMask) != 0:
|
||||||
echo osErrorMsg(osLastError())
|
echo osErrorMsg(osLastError())
|
||||||
quit(QuitFailure)
|
quit(QuitFailure)
|
||||||
|
|
||||||
declarePublicGauge connected_peers, "number of peers in the pool"
|
|
||||||
|
|
||||||
|
|
|
@ -75,7 +75,7 @@
|
||||||
import
|
import
|
||||||
std/[tables, sets, options, math, sequtils],
|
std/[tables, sets, options, math, sequtils],
|
||||||
stew/shims/net as stewNet, json_serialization/std/net,
|
stew/shims/net as stewNet, json_serialization/std/net,
|
||||||
stew/[byteutils, endians2], chronicles, chronos, stint, bearssl,
|
stew/endians2, chronicles, chronos, stint, bearssl,
|
||||||
eth/[rlp, keys, async_utils],
|
eth/[rlp, keys, async_utils],
|
||||||
types, encoding, node, routing_table, enr, random2, sessions
|
types, encoding, node, routing_table, enr, random2, sessions
|
||||||
|
|
||||||
|
@ -519,7 +519,7 @@ proc verifyNodesRecords*(enrs: openarray[Record], fromNode: Node,
|
||||||
continue
|
continue
|
||||||
# Check if returned node has one of the requested distances.
|
# Check if returned node has one of the requested distances.
|
||||||
if not distances.contains(logDist(n.id, fromNode.id)):
|
if not distances.contains(logDist(n.id, fromNode.id)):
|
||||||
warn "Nodes reply contained record with incorrect distance",
|
debug "Nodes reply contained record with incorrect distance",
|
||||||
record = n.record.toURI, sender = fromNode.record.toURI
|
record = n.record.toURI, sender = fromNode.record.toURI
|
||||||
continue
|
continue
|
||||||
|
|
||||||
|
|
|
@ -13,6 +13,8 @@ when useSnappy:
|
||||||
export
|
export
|
||||||
options, p2pProtocol, rlp, chronicles
|
options, p2pProtocol, rlp, chronicles
|
||||||
|
|
||||||
|
declarePublicGauge connected_peers, "number of peers in the pool"
|
||||||
|
|
||||||
logScope:
|
logScope:
|
||||||
topics = "rlpx"
|
topics = "rlpx"
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
import
|
import
|
||||||
std/tables,
|
std/tables,
|
||||||
chronos, chronicles, stint, testutils/unittests,
|
chronos, chronicles, stint, testutils/unittests,
|
||||||
stew/shims/net, eth/[keys, rlp], bearssl,
|
stew/shims/net, eth/keys, bearssl,
|
||||||
eth/p2p/discoveryv5/[enr, node, routing_table, encoding, sessions, types],
|
eth/p2p/discoveryv5/[enr, node, routing_table, encoding, sessions, types],
|
||||||
eth/p2p/discoveryv5/protocol as discv5_protocol,
|
eth/p2p/discoveryv5/protocol as discv5_protocol,
|
||||||
./discv5_test_helper
|
./discv5_test_helper
|
||||||
|
|
Loading…
Reference in New Issue