Skip to content

Commit b0ec96e

Browse files
[ETCM-355] Introduce ProtocolFamily
This also fixes a bug in NewBlock message creation, where only protocol version was taken into account
1 parent 224f32a commit b0ec96e

18 files changed

+69
-15
lines changed

src/main/scala/io/iohk/ethereum/blockchain/sync/regular/BlockBroadcast.scala

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ import io.iohk.ethereum.network.p2p.messages.BaseETH6XMessages
1717
import io.iohk.ethereum.network.p2p.messages.ETC64
1818
import io.iohk.ethereum.network.p2p.messages.ETH62
1919
import io.iohk.ethereum.network.p2p.messages.ETH62.BlockHash
20-
import io.iohk.ethereum.network.p2p.messages.ProtocolVersions
20+
import io.iohk.ethereum.network.p2p.messages.ProtocolFamily._
2121

2222
class BlockBroadcast(val etcPeerManager: ActorRef) {
2323

@@ -45,10 +45,12 @@ class BlockBroadcast(val etcPeerManager: ActorRef) {
4545

4646
private def broadcastNewBlock(blockToBroadcast: BlockToBroadcast, peers: Map[PeerId, PeerWithInfo]): Unit =
4747
obtainRandomPeerSubset(peers.values.map(_.peer).toSet).foreach { peer =>
48-
val message: MessageSerializable =
49-
if (peers(peer.id).peerInfo.remoteStatus.protocolVersion.toByte == ProtocolVersions.ETC64.version)
50-
blockToBroadcast.as64
51-
else blockToBroadcast.as63
48+
val remoteStatus = peers(peer.id).peerInfo.remoteStatus
49+
50+
val message: MessageSerializable = remoteStatus.protocolFamily match {
51+
case ETH => blockToBroadcast.as63
52+
case ETC => blockToBroadcast.as64
53+
}
5254
etcPeerManager ! EtcPeerManagerActor.SendMessage(message, peer.id)
5355
}
5456

src/main/scala/io/iohk/ethereum/network/EtcPeerManagerActor.scala

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,9 @@ import io.iohk.ethereum.network.p2p.messages.ETH62.BlockHeaders
2727
import io.iohk.ethereum.network.p2p.messages.ETH62.GetBlockHeaders
2828
import io.iohk.ethereum.network.p2p.messages.ETH62.NewBlockHashes
2929
import io.iohk.ethereum.network.p2p.messages.ETH64
30+
import io.iohk.ethereum.network.p2p.messages.ProtocolFamily
31+
import io.iohk.ethereum.network.p2p.messages.ProtocolFamily.ETC
32+
import io.iohk.ethereum.network.p2p.messages.ProtocolFamily.ETH
3033
import io.iohk.ethereum.network.p2p.messages.WireProtocol.Disconnect
3134
import io.iohk.ethereum.utils.ByteStringUtils
3235

@@ -240,6 +243,7 @@ object EtcPeerManagerActor {
240243
* (they are different versions of Status msg)
241244
*/
242245
case class RemoteStatus(
246+
protocolFamily: ProtocolFamily,
243247
protocolVersion: Int,
244248
networkId: Int,
245249
chainWeight: ChainWeight,
@@ -248,6 +252,7 @@ object EtcPeerManagerActor {
248252
) {
249253
override def toString: String =
250254
s"RemoteStatus { " +
255+
s"protocolFamily: $protocolFamily, " +
251256
s"protocolVersion: $protocolVersion, " +
252257
s"networkId: $networkId, " +
253258
s"chainWeight: $chainWeight, " +
@@ -259,6 +264,7 @@ object EtcPeerManagerActor {
259264
object RemoteStatus {
260265
def apply(status: ETH64.Status): RemoteStatus =
261266
RemoteStatus(
267+
ETH,
262268
status.protocolVersion,
263269
status.networkId,
264270
ChainWeight.totalDifficultyOnly(status.totalDifficulty),
@@ -267,10 +273,18 @@ object EtcPeerManagerActor {
267273
)
268274

269275
def apply(status: ETC64.Status): RemoteStatus =
270-
RemoteStatus(status.protocolVersion, status.networkId, status.chainWeight, status.bestHash, status.genesisHash)
276+
RemoteStatus(
277+
ETC,
278+
status.protocolVersion,
279+
status.networkId,
280+
status.chainWeight,
281+
status.bestHash,
282+
status.genesisHash
283+
)
271284

272285
def apply(status: BaseETH6XMessages.Status): RemoteStatus =
273286
RemoteStatus(
287+
ETH,
274288
status.protocolVersion,
275289
status.networkId,
276290
ChainWeight.totalDifficultyOnly(status.totalDifficulty),

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

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -31,18 +31,15 @@ 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) => {
34+
case Some(ProtocolVersions.ETC64) =>
3535
log.debug("Negotiated protocol version with client {} is etc/64", hello.clientId)
3636
EtcNodeStatus64ExchangeState(handshakerConfiguration)
37-
}
38-
case Some(ProtocolVersions.ETH63) => {
37+
case Some(ProtocolVersions.ETH63) =>
3938
log.debug("Negotiated protocol version with client {} is eth/63", hello.clientId)
4039
EthNodeStatus63ExchangeState(handshakerConfiguration)
41-
}
42-
case Some(ProtocolVersions.ETH64) => {
40+
case Some(ProtocolVersions.ETH64) =>
4341
log.debug("Negotiated protocol version with client {} is eth/64", hello.clientId)
4442
EthNodeStatus64ExchangeState(handshakerConfiguration)
45-
}
4643
case _ =>
4744
log.debug(
4845
s"Connected peer does not support {} / {} / {} protocol. Disconnecting.",

src/main/scala/io/iohk/ethereum/network/p2p/messages/package.scala

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,13 @@
11
package io.iohk.ethereum.network.p2p
22

3+
package messages {
4+
sealed trait ProtocolFamily
5+
object ProtocolFamily {
6+
final case object ETH extends ProtocolFamily
7+
final case object ETC extends ProtocolFamily
8+
}
9+
}
10+
311
package object messages {
412
object ProtocolVersions {
513
val ETH61: Capability = Capability("eth", 61.toByte)

src/test/scala/io/iohk/ethereum/blockchain/sync/BlockBroadcastSpec.scala

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ import io.iohk.ethereum.network.p2p.messages.BaseETH6XMessages
2727
import io.iohk.ethereum.network.p2p.messages.ETC64.NewBlock
2828
import io.iohk.ethereum.network.p2p.messages.ETH62
2929
import io.iohk.ethereum.network.p2p.messages.ETH62.NewBlockHashes
30+
import io.iohk.ethereum.network.p2p.messages.ProtocolFamily
3031
import io.iohk.ethereum.network.p2p.messages.ProtocolVersions
3132

3233
class BlockBroadcastSpec
@@ -61,7 +62,9 @@ class BlockBroadcastSpec
6162
val blockHeader: BlockHeader = baseBlockHeader.copy(number = initialPeerInfo.maxBlockNumber - 3)
6263
val newBlockNewHashes = NewBlockHashes(Seq(ETH62.BlockHash(blockHeader.hash, blockHeader.number)))
6364
val peerInfo = initialPeerInfo
64-
.copy(remoteStatus = peerStatus.copy(protocolVersion = ProtocolVersions.ETH63.version))
65+
.copy(remoteStatus =
66+
peerStatus.copy(protocolFamily = ProtocolFamily.ETH, protocolVersion = ProtocolVersions.ETH63.version)
67+
)
6568
.withChainWeight(ChainWeight.totalDifficultyOnly(initialPeerInfo.chainWeight.totalDifficulty))
6669
val newBlock =
6770
BaseETH6XMessages.NewBlock(Block(blockHeader, BlockBody(Nil, Nil)), peerInfo.chainWeight.totalDifficulty + 2)
@@ -176,6 +179,7 @@ class BlockBroadcastSpec
176179
val baseBlockHeader = Fixtures.Blocks.Block3125369.header
177180

178181
val peerStatus: RemoteStatus = RemoteStatus(
182+
protocolFamily = ProtocolFamily.ETC,
179183
protocolVersion = ProtocolVersions.ETC64.version,
180184
networkId = 1,
181185
chainWeight = ChainWeight(10, 10000),

src/test/scala/io/iohk/ethereum/blockchain/sync/PeersClientSpec.scala

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ import io.iohk.ethereum.network.EtcPeerManagerActor.PeerInfo
1616
import io.iohk.ethereum.network.EtcPeerManagerActor.RemoteStatus
1717
import io.iohk.ethereum.network.Peer
1818
import io.iohk.ethereum.network.PeerId
19+
import io.iohk.ethereum.network.p2p.messages.ProtocolFamily
1920
import io.iohk.ethereum.network.p2p.messages.ProtocolVersions
2021

2122
class PeersClientSpec extends AnyFlatSpec with Matchers with ScalaCheckPropertyChecks {
@@ -80,6 +81,7 @@ class PeersClientSpec extends AnyFlatSpec with Matchers with ScalaCheckPropertyC
8081
val peer3: Peer = Peer(PeerId("peer3"), new InetSocketAddress("127.0.0.1", 3), TestProbe().ref, false)
8182

8283
private val peerStatus = RemoteStatus(
84+
protocolFamily = ProtocolFamily.ETH,
8385
protocolVersion = ProtocolVersions.ETH63.version,
8486
networkId = 1,
8587
chainWeight = ChainWeight(0, 0),

src/test/scala/io/iohk/ethereum/blockchain/sync/PivotBlockSelectorSpec.scala

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ import io.iohk.ethereum.network.p2p.Message
3838
import io.iohk.ethereum.network.p2p.messages.BaseETH6XMessages.NewBlock
3939
import io.iohk.ethereum.network.p2p.messages.Codes
4040
import io.iohk.ethereum.network.p2p.messages.ETH62._
41+
import io.iohk.ethereum.network.p2p.messages.ProtocolFamily
4142
import io.iohk.ethereum.network.p2p.messages.ProtocolVersions
4243
import io.iohk.ethereum.utils.Config.SyncConfig
4344

@@ -587,6 +588,7 @@ class PivotBlockSelectorSpec
587588

588589
val peer1Status: RemoteStatus =
589590
RemoteStatus(
591+
ProtocolFamily.ETC,
590592
ProtocolVersions.ETC64.version,
591593
1,
592594
ChainWeight.totalDifficultyOnly(20),

src/test/scala/io/iohk/ethereum/blockchain/sync/StateSyncSpec.scala

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ import io.iohk.ethereum.network.PeerEventBusActor.PeerEvent.MessageFromPeer
4141
import io.iohk.ethereum.network.PeerId
4242
import io.iohk.ethereum.network.p2p.messages.ETH63.GetNodeData.GetNodeDataEnc
4343
import io.iohk.ethereum.network.p2p.messages.ETH63.NodeData
44+
import io.iohk.ethereum.network.p2p.messages.ProtocolFamily
4445
import io.iohk.ethereum.network.p2p.messages.ProtocolVersions
4546
import io.iohk.ethereum.utils.Config
4647

@@ -131,6 +132,7 @@ class StateSyncSpec
131132
val syncInit: TestProbe = TestProbe()
132133

133134
val peerStatus: RemoteStatus = RemoteStatus(
135+
protocolFamily = ProtocolFamily.ETH,
134136
protocolVersion = ProtocolVersions.ETH63.version,
135137
networkId = 1,
136138
chainWeight = ChainWeight.totalDifficultyOnly(10000),

src/test/scala/io/iohk/ethereum/blockchain/sync/TestSyncPeers.scala

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ import io.iohk.ethereum.network.EtcPeerManagerActor.PeerInfo
1010
import io.iohk.ethereum.network.EtcPeerManagerActor.RemoteStatus
1111
import io.iohk.ethereum.network.Peer
1212
import io.iohk.ethereum.network.PeerId
13+
import io.iohk.ethereum.network.p2p.messages.ProtocolFamily
1314
import io.iohk.ethereum.network.p2p.messages.ProtocolVersions
1415

1516
trait TestSyncPeers { self: TestSyncConfig =>
@@ -25,6 +26,7 @@ trait TestSyncPeers { self: TestSyncConfig =>
2526

2627
val peer1Status: RemoteStatus =
2728
RemoteStatus(
29+
ProtocolFamily.ETC,
2830
ProtocolVersions.ETC64.version,
2931
1,
3032
ChainWeight.totalDifficultyOnly(20),

src/test/scala/io/iohk/ethereum/blockchain/sync/fast/FastSyncBranchResolverActorSpec.scala

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ import io.iohk.ethereum.network.PeerEventBusActor.PeerEvent.MessageFromPeer
4444
import io.iohk.ethereum.network.PeerId
4545
import io.iohk.ethereum.network.p2p.messages.ETH62.BlockHeaders
4646
import io.iohk.ethereum.network.p2p.messages.ETH62.GetBlockHeaders
47+
import io.iohk.ethereum.network.p2p.messages.ProtocolFamily
4748
import io.iohk.ethereum.network.p2p.messages.ProtocolVersions
4849
import io.iohk.ethereum.utils.Logger
4950

@@ -264,6 +265,7 @@ class FastSyncBranchResolverActorSpec
264265
def getPeerInfo(peer: Peer, protocolVersion: Int = ProtocolVersions.ETC64.version): PeerInfo = {
265266
val status =
266267
RemoteStatus(
268+
ProtocolFamily.ETC,
267269
protocolVersion,
268270
1,
269271
ChainWeight.totalDifficultyOnly(1),

src/test/scala/io/iohk/ethereum/blockchain/sync/regular/RegularSyncFixtures.scala

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ import io.iohk.ethereum.network.p2p.messages.ETC64.NewBlock
4848
import io.iohk.ethereum.network.p2p.messages.ETH62._
4949
import io.iohk.ethereum.network.p2p.messages.ETH63.GetNodeData
5050
import io.iohk.ethereum.network.p2p.messages.ETH63.NodeData
51+
import io.iohk.ethereum.network.p2p.messages.ProtocolFamily
5152
import io.iohk.ethereum.network.p2p.messages.ProtocolVersions
5253
import io.iohk.ethereum.security.SecureRandomBuilder
5354
import io.iohk.ethereum.utils.Config.SyncConfig
@@ -122,9 +123,14 @@ trait RegularSyncFixtures { self: Matchers with AsyncMockFactory =>
122123
def getPeer(id: PeerId): Peer =
123124
Peer(id, new InetSocketAddress("127.0.0.1", 0), TestProbe(id.value).ref, incomingConnection = false)
124125

125-
def getPeerInfo(peer: Peer, protocolVersion: Int = ProtocolVersions.ETC64.version): PeerInfo = {
126+
def getPeerInfo(
127+
peer: Peer,
128+
protocolFamily: ProtocolFamily = ProtocolFamily.ETC,
129+
protocolVersion: Int = ProtocolVersions.ETC64.version
130+
): PeerInfo = {
126131
val status =
127132
RemoteStatus(
133+
protocolFamily,
128134
protocolVersion,
129135
1,
130136
ChainWeight.totalDifficultyOnly(1),

src/test/scala/io/iohk/ethereum/blockchain/sync/regular/RegularSyncSpec.scala

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@ import io.iohk.ethereum.network.p2p.messages.ETC64.NewBlock
5959
import io.iohk.ethereum.network.p2p.messages.ETH62._
6060
import io.iohk.ethereum.network.p2p.messages.ETH63.GetNodeData
6161
import io.iohk.ethereum.network.p2p.messages.ETH63.NodeData
62+
import io.iohk.ethereum.network.p2p.messages.ProtocolFamily
6263
import io.iohk.ethereum.network.p2p.messages.ProtocolVersions
6364
import io.iohk.ethereum.utils.Config.SyncConfig
6465

@@ -708,7 +709,7 @@ class RegularSyncSpec
708709
val peerWithETH63: (Peer, PeerInfo) = {
709710
val id = peerId(handshakedPeers.size)
710711
val peer = getPeer(id)
711-
val peerInfo = getPeerInfo(peer, ProtocolVersions.ETH63.version)
712+
val peerInfo = getPeerInfo(peer, ProtocolFamily.ETH, ProtocolVersions.ETH63.version)
712713
(peer, peerInfo)
713714
}
714715

src/test/scala/io/iohk/ethereum/jsonrpc/DebugServiceSpec.scala

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ import io.iohk.ethereum.network.PeerActor
2626
import io.iohk.ethereum.network.PeerId
2727
import io.iohk.ethereum.network.PeerManagerActor
2828
import io.iohk.ethereum.network.PeerManagerActor.Peers
29+
import io.iohk.ethereum.network.p2p.messages.ProtocolFamily
2930
import io.iohk.ethereum.network.p2p.messages.ProtocolVersions
3031

3132
class DebugServiceSpec
@@ -76,6 +77,7 @@ class DebugServiceSpec
7677
val debugService = new DebugService(peerManager.ref, etcPeerManager.ref)
7778

7879
val peerStatus: RemoteStatus = RemoteStatus(
80+
protocolFamily = ProtocolFamily.ETH,
7981
protocolVersion = ProtocolVersions.ETH63.version,
8082
networkId = 1,
8183
chainWeight = ChainWeight.totalDifficultyOnly(10000),

src/test/scala/io/iohk/ethereum/jsonrpc/JsonRpcControllerSpec.scala

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ import io.iohk.ethereum.jsonrpc.server.http.JsonRpcHttpServer
3636
import io.iohk.ethereum.jsonrpc.server.ipc.JsonRpcIpcServer
3737
import io.iohk.ethereum.network.EtcPeerManagerActor.PeerInfo
3838
import io.iohk.ethereum.network.EtcPeerManagerActor.RemoteStatus
39+
import io.iohk.ethereum.network.p2p.messages.ProtocolFamily
3940
import io.iohk.ethereum.network.p2p.messages.ProtocolVersions
4041

4142
class JsonRpcControllerSpec
@@ -129,6 +130,7 @@ class JsonRpcControllerSpec
129130

130131
it should "debug_listPeersInfo" in new JsonRpcControllerFixture {
131132
val peerStatus = RemoteStatus(
133+
protocolFamily = ProtocolFamily.ETH,
132134
protocolVersion = ProtocolVersions.ETH63.version,
133135
networkId = 1,
134136
chainWeight = ChainWeight.totalDifficultyOnly(10000),

src/test/scala/io/iohk/ethereum/network/EtcPeerManagerSpec.scala

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ import io.iohk.ethereum.network.p2p.messages.BaseETH6XMessages.NewBlock
3232
import io.iohk.ethereum.network.p2p.messages.Codes
3333
import io.iohk.ethereum.network.p2p.messages.ETC64
3434
import io.iohk.ethereum.network.p2p.messages.ETH62._
35+
import io.iohk.ethereum.network.p2p.messages.ProtocolFamily
3536
import io.iohk.ethereum.network.p2p.messages.ProtocolVersions
3637
import io.iohk.ethereum.network.p2p.messages.WireProtocol.Disconnect
3738
import io.iohk.ethereum.utils.Config
@@ -301,6 +302,7 @@ class EtcPeerManagerSpec extends AnyFlatSpec with Matchers {
301302
val forkResolver = new ForkResolver.EtcForkResolver(blockchainConfig.daoForkConfig.get)
302303

303304
val peerStatus: RemoteStatus = RemoteStatus(
305+
protocolFamily = ProtocolFamily.ETH,
304306
protocolVersion = ProtocolVersions.ETH63.version,
305307
networkId = 1,
306308
chainWeight = ChainWeight.totalDifficultyOnly(10000),

src/test/scala/io/iohk/ethereum/network/PeerEventBusActorSpec.scala

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ import io.iohk.ethereum.network.PeerEventBusActor.PeerEvent.PeerDisconnected
1919
import io.iohk.ethereum.network.PeerEventBusActor.PeerEvent.PeerHandshakeSuccessful
2020
import io.iohk.ethereum.network.PeerEventBusActor.PeerSelector
2121
import io.iohk.ethereum.network.PeerEventBusActor.SubscriptionClassifier._
22+
import io.iohk.ethereum.network.p2p.messages.ProtocolFamily
2223
import io.iohk.ethereum.network.p2p.messages.ProtocolVersions
2324
import io.iohk.ethereum.network.p2p.messages.WireProtocol.Ping
2425
import io.iohk.ethereum.network.p2p.messages.WireProtocol.Pong
@@ -250,6 +251,7 @@ class PeerEventBusActorSpec extends AnyFlatSpec with Matchers {
250251
val peerEventBusActor: ActorRef = system.actorOf(PeerEventBusActor.props)
251252

252253
val peerStatus: RemoteStatus = RemoteStatus(
254+
protocolFamily = ProtocolFamily.ETH,
253255
protocolVersion = ProtocolVersions.ETH63.version,
254256
networkId = 1,
255257
chainWeight = ChainWeight.totalDifficultyOnly(10000),

src/test/scala/io/iohk/ethereum/network/PeerManagerSpec.scala

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ import io.iohk.ethereum.network.discovery.DiscoveryConfig
5353
import io.iohk.ethereum.network.discovery.Node
5454
import io.iohk.ethereum.network.discovery.PeerDiscoveryManager
5555
import io.iohk.ethereum.network.p2p.messages.BaseETH6XMessages.NewBlock
56+
import io.iohk.ethereum.network.p2p.messages.ProtocolFamily
5657
import io.iohk.ethereum.network.p2p.messages.ProtocolVersions
5758
import io.iohk.ethereum.network.p2p.messages.WireProtocol.Disconnect
5859
import io.iohk.ethereum.utils.Config
@@ -631,6 +632,7 @@ class PeerManagerSpec
631632
val blacklist: CacheBasedBlacklist = CacheBasedBlacklist(cache)
632633

633634
val peerStatus: RemoteStatus = RemoteStatus(
635+
protocolFamily = ProtocolFamily.ETH,
634636
protocolVersion = ProtocolVersions.ETH63.version,
635637
networkId = 1,
636638
chainWeight = ChainWeight.totalDifficultyOnly(10000),

src/test/scala/io/iohk/ethereum/network/p2p/PeerActorSpec.scala

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ import io.iohk.ethereum.network.p2p.messages.Capability.Capabilities._
4949
import io.iohk.ethereum.network.p2p.messages.ETC64
5050
import io.iohk.ethereum.network.p2p.messages.ETH62.GetBlockHeaders.GetBlockHeadersEnc
5151
import io.iohk.ethereum.network.p2p.messages.ETH62._
52+
import io.iohk.ethereum.network.p2p.messages.ProtocolFamily
5253
import io.iohk.ethereum.network.p2p.messages.ProtocolVersions
5354
import io.iohk.ethereum.network.p2p.messages.WireProtocol.Disconnect.DisconnectEnc
5455
import io.iohk.ethereum.network.p2p.messages.WireProtocol.Disconnect.Reasons
@@ -431,6 +432,7 @@ class PeerActorSpec
431432
it should "stay connected to pre fork peer" in new TestSetup {
432433

433434
val remoteStatus = RemoteStatus(
435+
protocolFamily = ProtocolFamily.ETH,
434436
protocolVersion = ProtocolVersions.ETH63.version,
435437
networkId = peerConf.networkId,
436438
chainWeight =

0 commit comments

Comments
 (0)