Skip to content

Commit

Permalink
ETCM-254: Update integration spec to create codec.
Browse files Browse the repository at this point in the history
  • Loading branch information
aakoshh committed Oct 22, 2020
1 parent 176e459 commit ead702e
Showing 1 changed file with 5 additions and 2 deletions.
Expand Up @@ -31,6 +31,8 @@ class DiscoveryKademliaIntegrationSpec extends KademliaIntegrationSpec("Discover
// Using fake crypto and scodec encoding instead of RLP.
implicit val sigalg: SigAlg = new MockSigAlg()
import io.iohk.scalanet.discovery.ethereum.codecs.DefaultCodecs._
// Not dealing with non-conforming clients here.
implicit val packetCoded = Packet.packetCodec(allowDecodeOverMaxPacketSize = false)

override def generatePeerRecordWithKey() = {
val address = NetUtils.aRandomAddress
Expand All @@ -51,7 +53,8 @@ class DiscoveryKademliaIntegrationSpec extends KademliaIntegrationSpec("Discover
for {
peerGroup <- StaticUDPPeerGroup[Packet](
StaticUDPPeerGroup.Config(
bindAddress = nodeAddressToInetMultiAddress(selfNode.address).inetSocketAddress
bindAddress = nodeAddressToInetMultiAddress(selfNode.address).inetSocketAddress,
receiveBufferSizeBytes = Packet.MaxPacketBitsSize / 8 * 2
)
)
config = DiscoveryConfig.default.copy(
Expand All @@ -71,7 +74,7 @@ class DiscoveryKademliaIntegrationSpec extends KademliaIntegrationSpec("Discover
config = config
)
}
selfEnr = EthereumNodeRecord.fromNode(selfNode, privateKey, seq = 1).require
selfEnr = EthereumNodeRecord.fromNode(selfNode, privateKey, seq = System.currentTimeMillis).require
service <- DiscoveryService[InetMultiAddress](
privateKey,
node = selfNode,
Expand Down

0 comments on commit ead702e

Please sign in to comment.