loop icon indicating copy to clipboard operation
loop copied to clipboard

Add ability to buy reservations for instant outs from server

Open sputn1ck opened this issue 1 year ago • 1 comments

This pull request introduces several new features and improvements related to reservation management and state handling. The most significant changes include adding a new reservation command, updating the reservation state machine to support client-initiated reservations, and enhancing error handling and timeout configurations.

New Features:

  • Added a new reservation command to create reservations with specified values and expiry times in cmd/loop/reservations.go. [1] [2] [3]
  • Introduced client-initiated reservation handling in instantout/reservation/actions.go and instantout/reservation/fsm.go. [1] [2] [3] [4] [5] [6] [7] [8] [9] [10]

Enhancements:

  • Added a default RPC timeout configuration in cmd/loop/main.go.
  • Updated error handling and added timeout configurations for prepayment in instantout/reservation/actions.go. [1] [2] [3]

Testing and Mocking:

  • Updated tests and mock implementations to support new reservation commands and client-initiated reservations in instantout/reservation/actions_test.go. [1] [2] [3]

Code Refactoring:

  • Refactored the reservation manager to handle asynchronous events and maintain current blockchain height in instantout/reservation/manager.go. [1] [2] [3] [4]

These changes improve the flexibility and robustness of the reservation system, allowing for better error handling and support for both server-initiated and client-initiated reservations.

sputn1ck avatar Feb 03 '25 16:02 sputn1ck

@bhandras: review reminder @starius: review reminder @hieblmi: review reminder

lightninglabs-deploy avatar Dec 19 '25 10:12 lightninglabs-deploy