-
Notifications
You must be signed in to change notification settings - Fork 491
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
ledger: support WaitWithCancel for unsuccessful WaitForBlock API calls #5814
Conversation
Codecov Report
@@ Coverage Diff @@
## master #5814 +/- ##
==========================================
+ Coverage 54.45% 55.55% +1.10%
==========================================
Files 475 475
Lines 66848 66860 +12
==========================================
+ Hits 36399 37144 +745
+ Misses 27903 27194 -709
+ Partials 2546 2522 -24
... and 84 files with indirect coverage changes 📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
Updated to remove unnecessary atomic CompareAndSwap (since notifier is only ever used under lock by bulletin). I think the original purpose of notifier's atomic operation was in case it would ever be used by other types besides bulletin, but it is only used by bulletin today. |
Summary
The REST API WaitForBlockAfter call creates a notifier for each unique round requested, which remains present even if the HTTP request times out. This adds the ability to cancel and delete notifiers if no one wants them.
Test Plan
Added TestCancelWait