lnrpc: set a zero value endorsement signal on sender outgoing htlc

Before we have sufficient signaling in the network to relay this
signal, set a zero value experimental endorsement value on the sender's
outgoing htlc. Once the network is relaying this signal and a flag day
has been set, we'll be able to set a non-zero value here.
This commit is contained in:
Carla Kirk-Cohen committed 2024-11-22 09:16:57 -05:00
1 parent 774bfa740a
commit 4bb5b0c27c
3 files changed
+45 -16

No files matched your search

+6
View File
@@ -44,6 +44,7 @@ import (
"github.com/lightningnetwork/lnd/channeldb/graphsession"
"github.com/lightningnetwork/lnd/channeldb/models"
"github.com/lightningnetwork/lnd/channelnotifier"
"github.com/lightningnetwork/lnd/clock"
"github.com/lightningnetwork/lnd/contractcourt"
"github.com/lightningnetwork/lnd/discovery"
"github.com/lightningnetwork/lnd/feature"
@@ -758,6 +759,11 @@ func (r *rpcServer) addDeps(s *server, macService *macaroons.Service,
return nil
},
ShouldSetExpEndorsement: func() bool {
return clock.NewDefaultClock().Now().Before(
EndorsementExperimentEnd,
)
},
}
genInvoiceFeatures := func() *lnwire.FeatureVector {