funding: add Memo to InitFundingMsg struct

We add byte-array field called Memo to the InitFundingMsg struct.
We also provide a value for this from
rpcserver.go#parseOpenChannelReq().
This commit is contained in:
shaurya947 2023-05-03 16:21:44 -04:00
parent 1724409647
commit 7c6faa4c98
No known key found for this signature in database
2 changed files with 5 additions and 0 deletions

View File

@ -291,6 +291,10 @@ type InitFundingMsg struct {
// support explicit channel type negotiation. // support explicit channel type negotiation.
ChannelType *lnwire.ChannelType ChannelType *lnwire.ChannelType
// Memo is any arbitrary information we wish to store locally about the
// channel that will be useful to our future selves.
Memo []byte
// Updates is a channel which updates to the opening status of the // Updates is a channel which updates to the opening status of the
// channel are sent on. // channel are sent on.
Updates chan *lnrpc.OpenStatusUpdate Updates chan *lnrpc.OpenStatusUpdate

View File

@ -2203,6 +2203,7 @@ func (r *rpcServer) parseOpenChannelReq(in *lnrpc.OpenChannelRequest,
ChannelType: channelType, ChannelType: channelType,
FundUpToMaxAmt: fundUpToMaxAmt, FundUpToMaxAmt: fundUpToMaxAmt,
MinFundAmt: minFundAmt, MinFundAmt: minFundAmt,
Memo: []byte(in.Memo),
}, nil }, nil
} }