Another nim-eth bump and API changes fix (#821)

This commit is contained in:
Kim De Mey 2021-09-07 15:56:51 +02:00 committed by GitHub
parent 2c620c007d
commit 07b2116f6b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 5 deletions

View File

@ -147,7 +147,8 @@ proc handleAdvertise(p: PortalProtocol, a: AdvertiseMessage): seq[byte] =
encodeMessage(RequestProofsMessage(connectionId: connectionId,
contentKeys: contentKeys))
proc messageHandler*(protocol: TalkProtocol, request: seq[byte]): seq[byte] =
proc messageHandler*(protocol: TalkProtocol, request: seq[byte],
srcId: NodeId, srcUdpAddress: Address): seq[byte] =
doAssert(protocol of PortalProtocol)
let p = PortalProtocol(protocol)
@ -174,14 +175,13 @@ proc new*(T: type PortalProtocol, baseProtocol: protocol.Protocol,
contentHandler: ContentHandler,
dataRadius = UInt256.high()): T =
let proto = PortalProtocol(
routingTable: RoutingTable.init(baseProtocol.localNode, DefaultBitsPerHop,
DefaultTableIpLimits, baseProtocol.rng),
protocolHandler: messageHandler,
baseProtocol: baseProtocol,
dataRadius: dataRadius,
handleContentRequest: contentHandler)
proto.routingTable.init(baseProtocol.localNode, DefaultBitsPerHop,
DefaultTableIpLimits, baseProtocol.rng)
proto.baseProtocol.registerTalkProtocol(PortalProtocolId, proto).expect(
"Only one protocol should have this id")

2
vendor/nim-eth vendored

@ -1 +1 @@
Subproject commit bfadcfbfaf18916a2ee1b77b896e0d01c6a0ca4f
Subproject commit bea1f1c6a12decdec31080b6b63fd40d5e8b6a35