-
Notifications
You must be signed in to change notification settings - Fork 128
staticaddr: dyn-conf-tracker #1141
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
Open
hieblmi
wants to merge
15
commits into
master
Choose a base branch
from
dyn-conf-tracker-staging
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
15 commits
Select commit
Hold shift + click to select a range
e92462e
staticaddr: track unconfirmed deposits
hieblmi 1da7419
staticaddr/deposit: replay startup block to recovered deposits
hieblmi 9d0a196
staticaddr: apply confirmation policy by flow
hieblmi c1295bb
cmd/loop: warn for auto-selected low-conf deposits
hieblmi ce8b835
staticaddr/loopin: cancel orphan invoice when init fails early
hieblmi a12127f
staticaddr/deposit: async finalization cleanup
hieblmi ac76882
staticaddr: cancel loop-ins when deposit inputs vanish
hieblmi 80bc65d
staticaddr: harden client deposit readiness
hieblmi 44dd32e
staticaddr/loopin: wait for risk acceptance notification
hieblmi a235126
staticaddr/loopin: handle risk rejection notification
hieblmi 8128304
staticaddr/loopin: list failed swaps by state
hieblmi e6417b0
staticaddr/loopin: persist risk decisions
hieblmi 709784b
notifications: queue blocking fanout
hieblmi 5fef9a0
notifications: deduplicate risk fanout
hieblmi eff46ef
recover L402 and static address
hieblmi File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,50 @@ | ||
| package main | ||
|
|
||
| import ( | ||
| "context" | ||
|
|
||
| "github.com/lightninglabs/loop/looprpc" | ||
| "github.com/urfave/cli/v3" | ||
| ) | ||
|
|
||
| var recoverCommand = &cli.Command{ | ||
| Name: "recover", | ||
| Usage: "restore static address and L402 state from a local backup file", | ||
| Description: "Restores the local static-address state and L402 token " + | ||
| "from an encrypted backup file. If --backup_file is omitted, " + | ||
| "loopd selects the latest decryptable active-network backup " + | ||
| "candidate and fully validates it before restoring state.", | ||
| Flags: []cli.Flag{ | ||
| &cli.StringFlag{ | ||
| Name: "backup_file", | ||
| Usage: "path to an encrypted backup file; if omitted, " + | ||
| "loopd selects and validates the latest active-network " + | ||
| "backup candidate", | ||
| }, | ||
| }, | ||
| Action: runRecover, | ||
| } | ||
|
|
||
| func runRecover(ctx context.Context, cmd *cli.Command) error { | ||
| if cmd.NArg() > 0 { | ||
| return showCommandHelp(ctx, cmd) | ||
| } | ||
|
|
||
| client, cleanup, err := getClient(cmd) | ||
| if err != nil { | ||
| return err | ||
| } | ||
| defer cleanup() | ||
|
|
||
| resp, err := client.Recover( | ||
| ctx, &looprpc.RecoverRequest{ | ||
| BackupFile: cmd.String("backup_file"), | ||
| }, | ||
| ) | ||
| if err != nil { | ||
| return err | ||
| } | ||
|
|
||
| printRespJSON(resp) | ||
| return nil | ||
| } |
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
Oops, something went wrong.
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.