-
Notifications
You must be signed in to change notification settings - Fork 64
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
Watcher::store_triggered_appointment should be called as an async task #43
Comments
Hey @sr-gi, I have a fix which turns So from here I see two immediate options:
I have some other thoughts rolling around but wanted to start a discussion about how to move forward. Certainly open to criticism and other alternatives! |
Hey @carterian8, happy to see someone is up to help with this. My approach when I tried to solve this was going the Have in mind that |
Hey @sr-gi, happy to help! First regarding Assuming In the meantime I'll charge forward and continue to brainstorm cleaner solutions. |
Replacing |
Can't we make |
Or if we can make |
I don't really think there is a way of doing this, is there? Adding something to the responder means that we need some sort of So in order to make this work we'd either need an additional |
The current codebase has an edge case where, if
bitcoind
is unreachable while an already triggered appointment is added, andstore_triggered_appointment
is called as result, the request will hang and end up timing out but be accepted. However, the user will not be handed the receipt.This could be fixed making
store_triggered_appointment
be called as an async task, so the receipt can be handed straightaway. This is surprisingly not as straightforward as it sounds, and implies dealing with lifetimes in a way I don't fully understand (at least with my current knowledge of Rust 😅).The text was updated successfully, but these errors were encountered: