Handle internal transfers completed after shutdown#36
Handle internal transfers completed after shutdown#36TheBlueMatt-macbook wants to merge 2 commits intolightningdevkit:masterfrom
Conversation
I am not sure this is true. We set the metadata based on the events which we only mark as handled if we successfully set everything. I was hoping to avoid having |
|
The problem is that |
|
The maybe-more-robust version of this would be to hand |
Currently we only process setting `TxMetadata` for internal transfers if they complete in-line while the app is open and running the rebalance logic. If, however, an internal transfer is initiated but then does not complete the metadata is lost and instead our transaction list includes a LN payment received and no information about the trusted transaction at all. Instead, here, we track enough information in `TxType::PendingRebalance` to match the trusted transfer with an LN transaction and then do so in `list_transactions`, updating metadata as appropriate if we find a match. We handle upgrades from previous versions of Orange gracefully, though I'm not sure if we really need to do that yet.
bb7ca31 to
2d3f899
Compare
|
Rebased. |
2d3f899 to
01d1f3d
Compare
Did #46 which is kinda like this. Should be a lot safer across restarts and failures |
Currently we only process setting
TxMetadatafor internal transfers if they complete in-line while the app is open and running the rebalance logic. If, however, an internal transfer is initiated but then does not complete the metadata is lost and instead our transaction list includes a LN payment received and no information about the trusted transaction at all.Instead, here, we track enough information in
TxType::PendingRebalanceto match the trusted transfer with an LN transaction and then do so inlist_transactions, updating metadata as appropriate if we find a match.We handle upgrades from previous versions of Orange gracefully, though I'm not sure if we really need to do that yet.