loop
loop copied to clipboard
Add ability to buy reservations for instant outs from server
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.goandinstantout/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.
@bhandras: review reminder @starius: review reminder @hieblmi: review reminder