Skip to content

Commit a6882a3

Browse files
[ETCM-355] Log negotiated protocol version
1 parent ee0b117 commit a6882a3

File tree

1 file changed

+12
-3
lines changed

1 file changed

+12
-3
lines changed

src/main/scala/io/iohk/ethereum/network/handshaker/EtcHelloExchangeState.scala

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,18 @@ case class EtcHelloExchangeState(handshakerConfiguration: EtcHandshakerConfigura
3131
log.debug("Protocol handshake finished with peer ({})", hello)
3232
// FIXME in principle this should be already negotiated
3333
Capability.negotiate(hello.capabilities.toList, handshakerConfiguration.blockchainConfig.capabilities) match {
34-
case Some(ProtocolVersions.ETC64) => EtcNodeStatus64ExchangeState(handshakerConfiguration)
35-
case Some(ProtocolVersions.ETH63) => EthNodeStatus63ExchangeState(handshakerConfiguration)
36-
case Some(ProtocolVersions.ETH64) => EthNodeStatus64ExchangeState(handshakerConfiguration)
34+
case Some(ProtocolVersions.ETC64) => {
35+
log.debug("Negotiated protocol version with client {} is etc/64", hello.clientId)
36+
EtcNodeStatus64ExchangeState(handshakerConfiguration)
37+
}
38+
case Some(ProtocolVersions.ETH63) => {
39+
log.debug("Negotiated protocol version with client {} is eth/63", hello.clientId)
40+
EthNodeStatus63ExchangeState(handshakerConfiguration)
41+
}
42+
case Some(ProtocolVersions.ETH64) => {
43+
log.debug("Negotiated protocol version with client {} is eth/64", hello.clientId)
44+
EthNodeStatus64ExchangeState(handshakerConfiguration)
45+
}
3746
case _ =>
3847
log.debug(
3948
s"Connected peer does not support {} / {} / {} protocol. Disconnecting.",

0 commit comments

Comments
 (0)