-
Notifications
You must be signed in to change notification settings - Fork 901
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
mfc: check that we can retry when things go haywire
There's a version of this that keeps the PSBT in memory and does some fancy addition/subtraction of unuseable parts for the v2's, however it's much easier and simpler to simply error on the peer and re-start from the very beginning. This only works if we haven't gotten commitments from the peer yet (in fact either method would only work if we haven't got commitments from the peer yet), so if we've got commitments from them we simply mark them as failed an go again. In a perfect world, we'd remember what inputs we used last time, and reuse those again on the re-attempt, which would pefectly guarantee both that the failed opens (ones w/ commitments exchanged) would be canceled after this completes (and we could re-try the failed again). As it is, this is not perfect. It is, however, servicable.
- Loading branch information
1 parent
9ce07ec
commit ef1e36e
Showing
2 changed files
with
194 additions
and
15 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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