feat: async support for dlc-manager - #235
Open
bennyhodl wants to merge 1 commit into
Open
Conversation
Contributor
|
Having async interfaces would definitely be nice but that's something I'd like to give some thinking rather than just duplicating code tbh. I know bdk and ldk are using some macros to make this better and I'd probably want to check that first before considering which approach to take. |
Contributor
Author
|
Understood, looking at the Will have to change all of the iterators to for loops to keep the calls to the Oracle traits the same. Would this be worthwhile to try? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
builds on top of #234
Adds a feature flag of
async. There are functions for less reliance on oracles for creating offers and closing contracts. In my implementation ofdlcdevkitthe consumers are typically going to use async runtimes with gRPC servers, REST servers, tauri, etc. Manually closing contracts and tracking for attestations created code and solutions that I was not happy with for something I believe should be handled internally in the library.I think that
dlc-managershould manage contracts agnostic to runtimes. I.e. not having to spawn a blocking thread for periodic checks.This makes the manual close for situations in which an attestation is produced before the maturity. Not necessarily for async runtimes that are not running periodic checks for confirmed contracts.