-
Notifications
You must be signed in to change notification settings - Fork 55
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix publishing #250
fix publishing #250
Conversation
I like it.. I wanted to do this refactor but it would have taken me much more to figure it out.. don't worry about my further changes.. I just added some locks to heartbeat.. which worked 99% of the times.. still triggered nil peer tho I will just back-off a little bit once we can settle this properly. |
tests/pubsub/testfloodsub.nim
Outdated
@@ -60,7 +60,7 @@ suite "FloodSub": | |||
await nodes[1].subscribe("foobar", handler) | |||
await waitSub(nodes[0], nodes[1], "foobar") | |||
|
|||
await nodes[0].publish("foobar", "Hello!".toBytes()) | |||
discard await nodes[0].publish("foobar", "Hello!".toBytes()) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
check: await... == 1
(or whatever it should be?)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
check: 1 == await ...
maybe easier to read
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
that's from my branch btw 😄 , the thing is that this does not apply to flood, it will always be 0.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
btw I find it useful (nbc side for example I'm using it) to have this int with gossip. but we can remove it once things stabilize if you guys don't think it's necessary.. it's a debug tool tho
a0262a4
to
3fd1b77
Compare
* consolidate reading in lpstream * remove debug echo * tune log level * add channel cleanup and cancelation handling * cancelation handling * cancelation handling * cancelation handling * cancelation handling * cleanup and cancelation handling * cancelation handling * cancelation * tests * rename isConnected to connected * remove testing trace * comment out debug stacktraces * explicit raises
3fd1b77
to
4b2616f
Compare
|
||
libp2p_gossipsub_peers_per_topic_gossipsub | ||
.set(g.gossipsub.getOrDefault(topic).len.int64, labelValues = [topic]) | ||
if allPeers.len == 0: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
allpeers can't be zero in here
This is a WIP to fix some publishing issues, it duplicates some of the work in #244 so we might consider cherry picking either into this branch or into the #244 branch. I'm leaving it here for now as a reference ( @sinkingsugar )