Skip to content

Commit 5e557a5

Browse files
committed
Avoid using include in DiscoveryV5 implementation
This is a workaround to fix #3573. A better fix is to wait for status-im/nim-eth#809.
1 parent e54fca4 commit 5e557a5

File tree

1 file changed

+13
-2
lines changed

1 file changed

+13
-2
lines changed

execution_chain/networking/discoveryv5.nim

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,21 @@
99

1010
{.push raises: [].}
1111

12-
include
13-
eth/p2p/discoveryv5/protocol
12+
import
13+
std/[importutils, tables],
14+
metrics,
15+
chronicles,
16+
eth/p2p/discoveryv5/enr,
17+
eth/p2p/discoveryv5/encoding,
18+
eth/p2p/discoveryv5/sessions,
19+
eth/p2p/discoveryv5/protocol {.all.}
1420

21+
export
22+
Protocol, Node, Address, enr, newProtocol, open, close, seedTable, start, queryRandom, closeWait
23+
1524
proc receiveV5*(d: Protocol, a: Address, packet: openArray[byte]): Result[void, cstring] =
25+
privateAccess(Protocol)
26+
privateAccess(PendingRequest)
1627
discv5_network_bytes.inc(packet.len.int64, labelValues = [$Direction.In])
1728

1829
let packet = ?d.codec.decodePacket(a, packet)

0 commit comments

Comments
 (0)