-
Notifications
You must be signed in to change notification settings - Fork 99
Closed
Description
I saw this was commented TODO in main.rs, but I wanted to open an issue to see if others think this would be valuable to implement before I start working on a PR for it.
Motivation
It seems this--keeping track of payment info between times that a node is on/offline--would be helpful to demonstrate to a user. I don't think this adds significant complexity compared to what's already here, but I'm open to what others have to say.
Implementing this
My initial thoughts for what needs to be done to implement this:
-
On startup, read
inbound_paymentsandoutbound_paymentsif they have been previously persisted. -
Whenever
inbound_paymentsoroutbound_paymentsgets updated, persist payment info to disk. -
Haven’t totally fleshed out what’s the best way to persist/update payment info, but considering some of the following:
- Add custom
read_payment_infoandpersist_payment_infofunctions todisk.rs. - Implement
Writeabletrait (and maybeReadable) onPaymentInfoStorageso that we can persist usingFilesystemPersistersimilar to how other things are persisted. - Likely split up
inbound_paymentsandoutbound_paymentsinto 2 different files to not complicate serializing payment info
- Add custom
-
Where does payment info get updated?
main.rsinbound_payments|Event::PaymentClaimedoutbound_payments|Event::PaymentSentoutbound_payments|Event::PaymentFailed
cli.rsinbound_payments|get_invoiceoutbound_payments|send_paymentoutbound_payments|keysend
Metadata
Metadata
Assignees
Labels
No labels