Skip to content
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

Add ability to buy reservations for instant outs from server #883

Open
wants to merge 9 commits into
base: master
Choose a base branch
from

Conversation

sputn1ck
Copy link
Member

@sputn1ck sputn1ck commented Feb 3, 2025

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 sputn1ck marked this pull request as ready for review February 3, 2025 16:36
@sputn1ck sputn1ck self-assigned this Feb 3, 2025
@lightninglabs-deploy
Copy link

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

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