mirror of
https://github.com/lightninglabs/loop.git
synced 2026-08-13 12:33:03 +02:00
staticaddr/loopin: recover risk-decision deadlines
Record replayed server risk decisions through the loop-in store, recover accepted payment-deadline timers using the persisted decision time, and handle persisted rejections on restart. This lets recovered static loop-ins keep pending confirmation-risk state instead of restarting payment timing from scratch.
This commit is contained in:
parent
f01a1f02d9
commit
6593afc8bc
5 changed files with 656 additions and 55 deletions
|
|
@ -536,6 +536,14 @@ func (s *mockStaticAddressLoopInStore) IsStored(_ context.Context,
|
|||
return false, nil
|
||||
}
|
||||
|
||||
// RecordStaticAddressRiskDecision satisfies the static loop-in store interface.
|
||||
func (s *mockStaticAddressLoopInStore) RecordStaticAddressRiskDecision(
|
||||
_ context.Context, _ lntypes.Hash,
|
||||
_ loopin.ConfirmationRiskDecision) error {
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// GetLoopInByHash returns the configured loop-in with the given hash.
|
||||
func (s *mockStaticAddressLoopInStore) GetLoopInByHash(_ context.Context,
|
||||
swapHash lntypes.Hash) (*loopin.StaticAddressLoopIn, error) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue