Add register talk protocol unicity check

This commit is contained in:
Arnaud 2026-05-04 15:25:42 +04:00
parent 07b9e0427e
commit 02bf4427ed
No known key found for this signature in database
GPG Key ID: A6C7C781817146FA

View File

@ -1225,7 +1225,9 @@ proc open*(d: Protocol) {.raises: [Defect, CatchableError].} =
else:
@[byte 0]
)
discard d.registerTalkProtocol(clientModeProtocolId, clientModeProtocol)
discard d.registerTalkProtocol(clientModeProtocolId, clientModeProtocol).expect(
"Only one protocol should have this id"
)
d.seedTable()
trace "Routing table seeded."