channeldb: persist channel Memo field and read it when fetching

We add a Memo field to the OpenChannel DB struct. We also persist
it using a tlv record. We then pass the Memo value from the
InitFundingReserveMsg when creating a new reservation for the channel.
Finally, we also read Memo field when fetching channel from DB.
This commit is contained in:
shaurya947 committed 2023-05-18 13:02:30 -04:00
1 parent db44924c5a
commit 396a4cb6c4
2 files changed
+18 -1

No files matched your search

+1
View File
@@ -416,6 +416,7 @@ func NewChannelReservation(capacity, localFundingAmt btcutil.Amount,
Db: wallet.Cfg.Database,
InitialLocalBalance: ourBalance,
InitialRemoteBalance: theirBalance,
Memo: req.Memo,
},
pushMSat: req.PushMSat,
pendingChanID: req.PendingChanID,