-
Notifications
You must be signed in to change notification settings - Fork 403
Make BumpTransactionEventHandler
async-optional
#3540
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
Comments
I'm not quite sure this is true, due to I mean I'm all for more async-optional traits, but I'm not sure how we'd actually use async variants of |
Grr, right. I suppose we could fix that with |
That sound pretty bad privacy-wise? There would really be no use doing #1139 and/or going out of our way to do something similar while making payment key recoverable, to then just sweep everything to the same address in the end? Another approach to solve this for the And I guess we for the other concerns we could make the |
Just discussed offline that we try to prioritize this for 0.2, i.e., making |
After exploring optional asyncification and also (just for me) rust async in general, it seems that trying to do it all using macros isn't very pleasant. There's the macro that duplicates and asyncifies all the 'async-contaminated' functions, similar to pub struct OutputSweeper<B: Deref, D: Deref, E: Deref, F: Deref, K: Deref, L: Deref, O: Deref>
where
B::Target: BroadcasterInterface,
D::Target: ChangeDestinationSource,
E::Target: FeeEstimator,
F::Target: Filter + Sync + Send,
K::Target: KVStore,
L::Target: Logger,
O::Target: OutputSpender, And then Also driving sweeping from the background processor just to be able to use it asynchronously seems like a workaround too, which may not be ideal either. An alternative is to continue with the homebrewn callbacks for the wallet operations that this issue aims to make non-blocking. Need to see whether that introduces circular dependencies. (mostly take aways from offline discussion with @TheBlueMatt) |
Update: went with the third option of providing sync-wrappers in #3734. |
Turns out this it the only async -> sync -> (blocked) async inversion we have in
ldk-sample
, so making the traits async-optional (via some proc-macro?) would be really nice.The text was updated successfully, but these errors were encountered: