Skip to content

staticaddr/loopin: reject expiring deposits - #1202

Open
starius wants to merge 1 commit into
lightninglabs:masterfrom
starius:guard-deposit-expiry
Open

staticaddr/loopin: reject expiring deposits#1202
starius wants to merge 1 commit into
lightninglabs:masterfrom
starius:guard-deposit-expiry

Conversation

@starius

@starius starius commented Aug 17, 2026

Copy link
Copy Markdown
Collaborator

Manual static-address loop-ins can name explicit deposit outpoints. Those paths only checked that deposits were available. An old deposit could get a quote, then fail server init.

Apply the same swappability and expiry runway check used by automatic selection to manual quotes and initiation. The client now rejects before contacting the server.

Pull Request Checklist

  • Add an entry to docs/release-notes/release-notes-next.md, or apply the
    no-changelog label (required by CI)

Manual static-address loop-ins can name explicit deposit outpoints.
Those paths only checked that deposits were available. An old deposit
could get a quote, then fail server init.

Apply the same swappability and expiry runway check used by automatic
selection to manual quotes and initiation. The client now rejects before
contacting the server.
@starius
starius marked this pull request as ready for review August 17, 2026 23:32
@hieblmi
hieblmi self-requested a review August 24, 2026 21:27

@hieblmi hieblmi left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the fix.

LGTM pending two improvements.

"address parameters: %w", err)
}

info, err := s.lnd.Client.GetInfo(ctx)

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we also need this call in the if branch above, so we might as well only call it once before the if, then reuse it here.

)
}

params, err := s.staticAddressManager.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we also need this call in the if branch above, so we might as well only call it once before the if, then reuse it here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants