-
Notifications
You must be signed in to change notification settings - Fork 7
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
Add the ability to listen for discovered chains #808
base: main
Are you sure you want to change the base?
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #808 +/- ##
==========================================
- Coverage 68.97% 68.54% -0.44%
==========================================
Files 81 81
Lines 8255 8281 +26
==========================================
- Hits 5694 5676 -18
- Misses 2079 2116 +37
- Partials 482 489 +7
|
4f48648
to
76ce337
Compare
0bca51c
to
b200822
Compare
Expand chain exchange to accept a listener which is notified whenever a new chain is discovered. This mechanism is intended to be integrated into F3 host pubsub, whereupon receiving a partial message the host looks up its chain. When known, the chain is returned immediately. Otherwise, the host would buffer the partial message and await notification of its discovering from chain exchange. Part of #792
b200822
to
7c4840e
Compare
If you are saying we are fine with doing it under lock, we should keep it under lock. Manual interrupted locking like this is a foot gun. |
I take this as a blocker? It's either this or notify listener under lock. I have no preference. Taking a closer look at the lru library we are using, I am sort of underwhelmed that it doesn't expose atomic combined removal operations. if we had those, we could remove the need for lock in most places. I also understand why they haven't , i.e. the auto eviction of lru used for caching. |
Expand chain exchange to accept a listener which is notified whenever a new chain is discovered. This mechanism is intended to be integrated into F3 host pubsub, whereupon receiving a partial message the host looks up its chain. When known, the chain is returned immediately. Otherwise, the host would buffer the partial message and await notification of its discovering from chain exchange.
Part of #792