feat: ability to disable automatic broadcasting of refund transactions#151
Merged
feat: ability to disable automatic broadcasting of refund transactions#151
Conversation
matthewjablack
approved these changes
Mar 3, 2026
Contributor
matthewjablack
left a comment
There was a problem hiding this comment.
One nit. Other than that LGTM 🎉
|
|
||
| // TODO: Make this public to refund | ||
| #[tracing::instrument(skip_all, level = "debug")] | ||
| async fn check_refund(&self, contract: &SignedContract) -> Result<(), Error> { |
Contributor
There was a problem hiding this comment.
can remove the TODO since it's already public
ddk-manager/src/manager.rs
Outdated
| .lock_time | ||
| .to_consensus_u32() as u64 | ||
| <= self.time.unix_time_now() | ||
| && *AUTOMATIC_REFUND |
Contributor
There was a problem hiding this comment.
I guess && *AUTOMATIC_REFUND means that ddk won't detect a counterparty broadcasting refund tx either, but I think that's fine for now
Owner
Author
There was a problem hiding this comment.
Good point added a check for confirmations before checking the broadcast
f223daa to
c026a02
Compare
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.
Adds the ability to disable automatic broadcasting of refund transactions with
AUTOMATIC_REFUND=falsedefaults totrue.If true, callers must call
refund_dlc()inddk