From 35a48fa56026307f1526da20a43d19abd88c1312 Mon Sep 17 00:00:00 2001 From: Giovanni Petrantoni Date: Tue, 7 Apr 2020 22:07:00 +0900 Subject: [PATCH] Re-enable gossipsub internal tests when running CI minor bonus: add a link in the comments about bearssl issue with callbacks --- libp2p/crypto/chacha20poly1305.nim | 1 + libp2p/protocols/pubsub/gossipsub.nim | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/libp2p/crypto/chacha20poly1305.nim b/libp2p/crypto/chacha20poly1305.nim index f22bcbb45..8aa4d80a2 100644 --- a/libp2p/crypto/chacha20poly1305.nim +++ b/libp2p/crypto/chacha20poly1305.nim @@ -18,6 +18,7 @@ import bearssl # have to do this due to a nim bug and raises[] on callbacks +# https://github.com/nim-lang/Nim/issues/13905 proc ourPoly1305CtmulRun*(key: pointer; iv: pointer; data: pointer; len: int; aad: pointer; aadLen: int; tag: pointer; ichacha: pointer; encrypt: cint) {.cdecl, importc: "br_poly1305_ctmul_run", diff --git a/libp2p/protocols/pubsub/gossipsub.nim b/libp2p/protocols/pubsub/gossipsub.nim index 0f3770cf0..cb421b78f 100644 --- a/libp2p/protocols/pubsub/gossipsub.nim +++ b/libp2p/protocols/pubsub/gossipsub.nim @@ -445,7 +445,7 @@ method initPubSub(g: GossipSub) = g.heartbeatLock = newAsyncLock() ## Unit tests -when isMainModule and not defined(release): +when isMainModule: ## Test internal (private) methods for gossip, ## mesh and fanout maintenance. ## Usually I wouldn't test private behaviour,