Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
channeldb+lnrpc: re-work invoicing API to implement robust streaming notification delivery #1125
In this PR, we modify the streaming invoice subscription API slightly in order to allow callers to have assurance that they haven't missed any new payments. The
Care has been taken to ensure that the new API is backwards compatible with the expectations of the old API. Namely, if the fields aren't specified (are zero), then no backlog notifications will be delivered. As a result, the index on-disk actually starts at 1.
A database migration has been created in order to upgrade old databases to the new invoice schema that has these two new indexes which need to be updated each time a new invoice has been added, or an exiting one settled.
Finally, a new field has been added to the on-disk
Nice, this is a cool feature
Did an initial pass, overall design looks complete. There may be issues with reordering of add/settle indexes, but idt they will be difficult to fix.