-
-
Notifications
You must be signed in to change notification settings - Fork 89
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
sdk: add FilterOptions
#124
Conversation
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.
LGTM. I tested both of the new variants and they work.
I found one weird edge-case, where using FilterOptions::WaitForEventsAfterEOSE(x)
actually waits until timeout
, even if x
events were received after EOSE
. This happens when one of the relays is unresponsive and runs into timeout
. In a sense, it behaves as expected, so I'd just ignore this for now.
I experimented with a different approach: #129 . I tested all 3 branches and they work. I mainly tried to make the inner logic more readable and easier to reason about. What do you think? |
On second thought, your new version is actually simpler. I closed my PR. |
I found a bug in your version:
So calling it with
will return after 1 second with a timeout (even though |
Yes, the |
IMO the simpler approach is better:
I see two big reasons for this:
|
Add `get_events_of_with_opts` and `req_events_of_with_opts` methods
Tested all 3 versions, with different |
Closes #119