Closed fxfactorial closed 4 years ago
This is actually very easy to fix: just add a Has
check in the implementation of the timecache backed blacklist.
Care for a patch?
Or we might try fixing the upstream library directly to support multiple puts.
I think fix upstream is better but can it be done quick ? I don’t know that upstream dep , how quick it can be updated
fixing upstream a little more complicated I think.
Right then we’re back at my op about soln and it’s only diff if I put it app layer or in your layer at libp2p, sounds like latter? If so , then ya , I’ll open PR
It is better if we put it in the pubsub library; a pr would be very welcome!
I use:
and use the
pubsub.BlacklistPeer(peer)
but the upstream dep onwhyrusleeping
imo is bad because banning peers more than once, the same peer, causes a panic on add, so to use it right, I'd need to hold the ref to the blacklist, call contained before calling add, kinda too much of a hassle to accomdate this API.from timecache.go
Please implement blacklist without a panic causing lib