From 7c6faa4c9889aaa6a3fd6ae1f4e9849328cd7326 Mon Sep 17 00:00:00 2001 From: shaurya947 Date: Wed, 3 May 2023 16:21:44 -0400 Subject: [PATCH] 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(). --- funding/manager.go | 4 ++++ rpcserver.go | 1 + 2 files changed, 5 insertions(+) diff --git a/funding/manager.go b/funding/manager.go index 043ea4eb9..8563ec94e 100644 --- a/funding/manager.go +++ b/funding/manager.go @@ -291,6 +291,10 @@ type InitFundingMsg struct { // support explicit channel type negotiation. 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 // channel are sent on. Updates chan *lnrpc.OpenStatusUpdate diff --git a/rpcserver.go b/rpcserver.go index 0cc50bf00..70be09a76 100644 --- a/rpcserver.go +++ b/rpcserver.go @@ -2203,6 +2203,7 @@ func (r *rpcServer) parseOpenChannelReq(in *lnrpc.OpenChannelRequest, ChannelType: channelType, FundUpToMaxAmt: fundUpToMaxAmt, MinFundAmt: minFundAmt, + Memo: []byte(in.Memo), }, nil }