mirror of https://github.com/status-im/nim-eth.git
add eth topic to all the logs scope (#568)
This commit is contained in:
parent
571b98d7f7
commit
5c46220e72
|
@ -45,7 +45,7 @@ var
|
||||||
externalUdpPort: Port
|
externalUdpPort: Port
|
||||||
|
|
||||||
logScope:
|
logScope:
|
||||||
topics = "nat"
|
topics = "eth net nat"
|
||||||
|
|
||||||
## Also does threadvar initialisation.
|
## Also does threadvar initialisation.
|
||||||
## Must be called before redirectPorts() in each thread.
|
## Must be called before redirectPorts() in each thread.
|
||||||
|
|
|
@ -16,6 +16,10 @@ import
|
||||||
export
|
export
|
||||||
p2p_types, rlpx, enode, kademlia
|
p2p_types, rlpx, enode, kademlia
|
||||||
|
|
||||||
|
logScope:
|
||||||
|
topics = "eth p2p"
|
||||||
|
|
||||||
|
|
||||||
proc addCapability*(node: var EthereumNode,
|
proc addCapability*(node: var EthereumNode,
|
||||||
p: ProtocolInfo,
|
p: ProtocolInfo,
|
||||||
networkState: RootRef = nil) =
|
networkState: RootRef = nil) =
|
||||||
|
|
|
@ -18,7 +18,7 @@ export
|
||||||
Node, results
|
Node, results
|
||||||
|
|
||||||
logScope:
|
logScope:
|
||||||
topics = "discovery"
|
topics = "eth p2p discovery"
|
||||||
|
|
||||||
const
|
const
|
||||||
# UDP packet constants.
|
# UDP packet constants.
|
||||||
|
|
|
@ -29,7 +29,7 @@ declareCounter discovery_session_lru_cache_misses, "Session LRU cache misses"
|
||||||
declareCounter discovery_session_decrypt_failures, "Session decrypt failures"
|
declareCounter discovery_session_decrypt_failures, "Session decrypt failures"
|
||||||
|
|
||||||
logScope:
|
logScope:
|
||||||
topics = "discv5"
|
topics = "eth p2p discv5"
|
||||||
|
|
||||||
# Support overriding the default discv5 protocol version and protocol id
|
# Support overriding the default discv5 protocol version and protocol id
|
||||||
# via compile time defines (e.g., '-d:discv5_protocol_id=d5waku')
|
# via compile time defines (e.g., '-d:discv5_protocol_id=d5waku')
|
||||||
|
|
|
@ -101,7 +101,7 @@ declareCounter discovery_enr_auto_update,
|
||||||
"Amount of discovery IP:port address ENR auto updates"
|
"Amount of discovery IP:port address ENR auto updates"
|
||||||
|
|
||||||
logScope:
|
logScope:
|
||||||
topics = "discv5"
|
topics = "eth p2p discv5"
|
||||||
|
|
||||||
const
|
const
|
||||||
alpha = 3 ## Kademlia concurrency factor
|
alpha = 3 ## Kademlia concurrency factor
|
||||||
|
|
|
@ -16,7 +16,7 @@ import
|
||||||
export sets # TODO: This should not be needed, but compilation fails otherwise
|
export sets # TODO: This should not be needed, but compilation fails otherwise
|
||||||
|
|
||||||
logScope:
|
logScope:
|
||||||
topics = "kademlia"
|
topics = "eth p2p kademlia"
|
||||||
|
|
||||||
type
|
type
|
||||||
# 32 bytes NodeId | 16 bytes ip | 1 byte mode
|
# 32 bytes NodeId | 16 bytes ip | 1 byte mode
|
||||||
|
|
|
@ -16,6 +16,10 @@ import
|
||||||
".."/[keys, common],
|
".."/[keys, common],
|
||||||
./private/p2p_types, "."/[discovery, kademlia, rlpx, enode]
|
./private/p2p_types, "."/[discovery, kademlia, rlpx, enode]
|
||||||
|
|
||||||
|
logScope:
|
||||||
|
topics = "eth p2p peer_pool"
|
||||||
|
|
||||||
|
|
||||||
const
|
const
|
||||||
lookupInterval = 5
|
lookupInterval = 5
|
||||||
connectLoopSleep = chronos.milliseconds(2000)
|
connectLoopSleep = chronos.milliseconds(2000)
|
||||||
|
|
|
@ -37,7 +37,7 @@ export
|
||||||
declarePublicGauge connected_peers, "number of peers in the pool"
|
declarePublicGauge connected_peers, "number of peers in the pool"
|
||||||
|
|
||||||
logScope:
|
logScope:
|
||||||
topics = "rlpx"
|
topics = "eth p2p rlpx"
|
||||||
|
|
||||||
type
|
type
|
||||||
ResponderWithId*[MsgType] = object
|
ResponderWithId*[MsgType] = object
|
||||||
|
|
|
@ -16,7 +16,7 @@ import
|
||||||
export utp_router, protocol
|
export utp_router, protocol
|
||||||
|
|
||||||
logScope:
|
logScope:
|
||||||
topics = "utp_discv5_protocol"
|
topics = "eth utp utp_discv5_protocol"
|
||||||
|
|
||||||
type
|
type
|
||||||
NodeAddress* = object
|
NodeAddress* = object
|
||||||
|
|
|
@ -13,7 +13,7 @@ import
|
||||||
../keys
|
../keys
|
||||||
|
|
||||||
logScope:
|
logScope:
|
||||||
topics = "utp"
|
topics = "eth utp"
|
||||||
|
|
||||||
type
|
type
|
||||||
# For now utp protocol is tied to udp transport, but ultimately we would like to
|
# For now utp protocol is tied to udp transport, but ultimately we would like to
|
||||||
|
|
|
@ -16,7 +16,7 @@ import
|
||||||
export utp_socket
|
export utp_socket
|
||||||
|
|
||||||
logScope:
|
logScope:
|
||||||
topics = "utp_router"
|
topics = "eth utp utp_router"
|
||||||
|
|
||||||
declareCounter utp_received_packets,
|
declareCounter utp_received_packets,
|
||||||
"All correct received uTP packets"
|
"All correct received uTP packets"
|
||||||
|
|
|
@ -21,7 +21,7 @@ export
|
||||||
chronicles
|
chronicles
|
||||||
|
|
||||||
logScope:
|
logScope:
|
||||||
topics = "utp_socket"
|
topics = "eth utp utp_socket"
|
||||||
|
|
||||||
type
|
type
|
||||||
ConnectionState* = enum
|
ConnectionState* = enum
|
||||||
|
|
Loading…
Reference in New Issue