mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-06-03 03:29:50 +02:00
Merge pull request #8509 from GeorgeTsagk/scid-alias-rpcs
Add more RPCs for scid aliases
This commit is contained in:
commit
b009db329f
@ -10,6 +10,11 @@ import (
|
||||
"github.com/lightningnetwork/lnd/lnwire"
|
||||
)
|
||||
|
||||
// UpdateLinkAliases locates the active link that matches the given
|
||||
// shortID and triggers an update based on the latest values of the
|
||||
// alias manager.
|
||||
type UpdateLinkAliases func(shortID lnwire.ShortChannelID) error
|
||||
|
||||
var (
|
||||
// aliasBucket stores aliases as keys and their base SCIDs as values.
|
||||
// This is used to populate the maps that the Manager uses. The keys
|
||||
@ -77,6 +82,10 @@ var (
|
||||
type Manager struct {
|
||||
backend kvdb.Backend
|
||||
|
||||
// LinkUpdater is a function used by aliasmgr to facilitate live update
|
||||
// of aliases in other subsystems.
|
||||
LinkUpdater UpdateLinkAliases
|
||||
|
||||
// baseToSet is a mapping from the "base" SCID to the set of aliases
|
||||
// for this channel. This mapping includes all channels that
|
||||
// negotiated the option-scid-alias feature bit.
|
||||
@ -98,11 +107,14 @@ type Manager struct {
|
||||
}
|
||||
|
||||
// NewManager initializes an alias Manager from the passed database backend.
|
||||
func NewManager(db kvdb.Backend) (*Manager, error) {
|
||||
func NewManager(db kvdb.Backend,
|
||||
linkUpdater UpdateLinkAliases) (*Manager, error) {
|
||||
|
||||
m := &Manager{backend: db}
|
||||
m.baseToSet = make(map[lnwire.ShortChannelID][]lnwire.ShortChannelID)
|
||||
m.aliasToBase = make(map[lnwire.ShortChannelID]lnwire.ShortChannelID)
|
||||
m.peerAlias = make(map[lnwire.ChannelID]lnwire.ShortChannelID)
|
||||
m.LinkUpdater = linkUpdater
|
||||
|
||||
err := m.populateMaps()
|
||||
return m, err
|
||||
@ -215,12 +227,22 @@ func (m *Manager) populateMaps() error {
|
||||
// AddLocalAlias adds a database mapping from the passed alias to the passed
|
||||
// base SCID. The gossip boolean marks whether or not to create a mapping
|
||||
// that the gossiper will use. It is set to false for the upgrade path where
|
||||
// the feature-bit is toggled on and there are existing channels.
|
||||
// the feature-bit is toggled on and there are existing channels. The linkUpdate
|
||||
// flag is used to signal whether this function should also trigger an update
|
||||
// on the htlcswitch scid alias maps.
|
||||
func (m *Manager) AddLocalAlias(alias, baseScid lnwire.ShortChannelID,
|
||||
gossip bool) error {
|
||||
gossip, linkUpdate bool) error {
|
||||
|
||||
// We need to lock the manager for the whole duration of this method,
|
||||
// except for the very last part where we call the link updater. In
|
||||
// order for us to safely use a defer _and_ still be able to manually
|
||||
// unlock, we use a sync.Once.
|
||||
m.Lock()
|
||||
defer m.Unlock()
|
||||
unlockOnce := sync.Once{}
|
||||
unlock := func() {
|
||||
unlockOnce.Do(m.Unlock)
|
||||
}
|
||||
defer unlock()
|
||||
|
||||
err := kvdb.Update(m.backend, func(tx kvdb.RwTx) error {
|
||||
// If the caller does not want to allow the alias to be used
|
||||
@ -270,6 +292,18 @@ func (m *Manager) AddLocalAlias(alias, baseScid lnwire.ShortChannelID,
|
||||
m.aliasToBase[alias] = baseScid
|
||||
}
|
||||
|
||||
// We definitely need to unlock the Manager before calling the link
|
||||
// updater. If we don't, we'll deadlock. We use a sync.Once to ensure
|
||||
// that we only unlock once.
|
||||
unlock()
|
||||
|
||||
// Finally, we trigger a htlcswitch update if the flag is set, in order
|
||||
// for any future htlc that references the added alias to be properly
|
||||
// routed.
|
||||
if linkUpdate {
|
||||
return m.LinkUpdater(baseScid)
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
@ -340,6 +374,72 @@ func (m *Manager) DeleteSixConfs(baseScid lnwire.ShortChannelID) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
// DeleteLocalAlias removes a mapping from the database and the Manager's maps.
|
||||
func (m *Manager) DeleteLocalAlias(alias,
|
||||
baseScid lnwire.ShortChannelID) error {
|
||||
|
||||
// We need to lock the manager for the whole duration of this method,
|
||||
// except for the very last part where we call the link updater. In
|
||||
// order for us to safely use a defer _and_ still be able to manually
|
||||
// unlock, we use a sync.Once.
|
||||
m.Lock()
|
||||
unlockOnce := sync.Once{}
|
||||
unlock := func() {
|
||||
unlockOnce.Do(m.Unlock)
|
||||
}
|
||||
defer unlock()
|
||||
|
||||
err := kvdb.Update(m.backend, func(tx kvdb.RwTx) error {
|
||||
aliasToBaseBucket, err := tx.CreateTopLevelBucket(aliasBucket)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
var aliasBytes [8]byte
|
||||
byteOrder.PutUint64(aliasBytes[:], alias.ToUint64())
|
||||
|
||||
return aliasToBaseBucket.Delete(aliasBytes[:])
|
||||
}, func() {})
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
// Now that the database state has been updated, we'll delete the
|
||||
// mapping from the Manager's maps.
|
||||
aliasSet, ok := m.baseToSet[baseScid]
|
||||
if !ok {
|
||||
return nil
|
||||
}
|
||||
|
||||
// We'll iterate through the alias set and remove the alias from the
|
||||
// set.
|
||||
for i, a := range aliasSet {
|
||||
if a.ToUint64() == alias.ToUint64() {
|
||||
aliasSet = append(aliasSet[:i], aliasSet[i+1:]...)
|
||||
break
|
||||
}
|
||||
}
|
||||
|
||||
// If the alias set is empty, we'll delete the base SCID from the
|
||||
// baseToSet map.
|
||||
if len(aliasSet) == 0 {
|
||||
delete(m.baseToSet, baseScid)
|
||||
} else {
|
||||
m.baseToSet[baseScid] = aliasSet
|
||||
}
|
||||
|
||||
// Finally, we'll delete the aliasToBase mapping from the Manager's
|
||||
// cache.
|
||||
delete(m.aliasToBase, alias)
|
||||
|
||||
// We definitely need to unlock the Manager before calling the link
|
||||
// updater. If we don't, we'll deadlock. We use a sync.Once to ensure
|
||||
// that we only unlock once.
|
||||
unlock()
|
||||
|
||||
return m.LinkUpdater(baseScid)
|
||||
}
|
||||
|
||||
// PutPeerAlias stores the peer's alias SCID once we learn of it in the
|
||||
// channel_ready message.
|
||||
func (m *Manager) PutPeerAlias(chanID lnwire.ChannelID,
|
||||
|
@ -23,7 +23,11 @@ func TestAliasStorePeerAlias(t *testing.T) {
|
||||
require.NoError(t, err)
|
||||
defer db.Close()
|
||||
|
||||
aliasStore, err := NewManager(db)
|
||||
linkUpdater := func(shortID lnwire.ShortChannelID) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
aliasStore, err := NewManager(db, linkUpdater)
|
||||
require.NoError(t, err)
|
||||
|
||||
var chanID1 [32]byte
|
||||
@ -52,7 +56,14 @@ func TestAliasStoreRequest(t *testing.T) {
|
||||
require.NoError(t, err)
|
||||
defer db.Close()
|
||||
|
||||
aliasStore, err := NewManager(db)
|
||||
updateChan := make(chan struct{}, 1)
|
||||
|
||||
linkUpdater := func(shortID lnwire.ShortChannelID) error {
|
||||
updateChan <- struct{}{}
|
||||
return nil
|
||||
}
|
||||
|
||||
aliasStore, err := NewManager(db, linkUpdater)
|
||||
require.NoError(t, err)
|
||||
|
||||
// We'll assert that the very first alias we receive is StartingAlias.
|
||||
@ -68,6 +79,88 @@ func TestAliasStoreRequest(t *testing.T) {
|
||||
require.Equal(t, nextAlias, alias2)
|
||||
}
|
||||
|
||||
// TestAliasLifecycle tests that the aliases can be created and deleted.
|
||||
func TestAliasLifecycle(t *testing.T) {
|
||||
t.Parallel()
|
||||
|
||||
// Create the backend database and use this to create the aliasStore.
|
||||
dbPath := filepath.Join(t.TempDir(), "testdb")
|
||||
db, err := kvdb.Create(
|
||||
kvdb.BoltBackendName, dbPath, true, kvdb.DefaultDBTimeout,
|
||||
)
|
||||
require.NoError(t, err)
|
||||
defer db.Close()
|
||||
|
||||
updateChan := make(chan struct{}, 1)
|
||||
|
||||
linkUpdater := func(shortID lnwire.ShortChannelID) error {
|
||||
updateChan <- struct{}{}
|
||||
return nil
|
||||
}
|
||||
|
||||
aliasStore, err := NewManager(db, linkUpdater)
|
||||
require.NoError(t, err)
|
||||
|
||||
const (
|
||||
base = uint64(123123123)
|
||||
alias = uint64(456456456)
|
||||
)
|
||||
|
||||
// Parse the aliases and base to short channel ID format.
|
||||
baseScid := lnwire.NewShortChanIDFromInt(base)
|
||||
aliasScid := lnwire.NewShortChanIDFromInt(alias)
|
||||
aliasScid2 := lnwire.NewShortChanIDFromInt(alias + 1)
|
||||
|
||||
// Add the first alias.
|
||||
err = aliasStore.AddLocalAlias(aliasScid, baseScid, false, true)
|
||||
require.NoError(t, err)
|
||||
|
||||
// The link updater should be called.
|
||||
<-updateChan
|
||||
|
||||
// Query the aliases and verify the results.
|
||||
aliasList := aliasStore.GetAliases(baseScid)
|
||||
require.Len(t, aliasList, 1)
|
||||
require.Contains(t, aliasList, aliasScid)
|
||||
|
||||
// Add the second alias.
|
||||
err = aliasStore.AddLocalAlias(aliasScid2, baseScid, false, true)
|
||||
require.NoError(t, err)
|
||||
|
||||
// The link updater should be called.
|
||||
<-updateChan
|
||||
|
||||
// Query the aliases and verify the results.
|
||||
aliasList = aliasStore.GetAliases(baseScid)
|
||||
require.Len(t, aliasList, 2)
|
||||
require.Contains(t, aliasList, aliasScid)
|
||||
require.Contains(t, aliasList, aliasScid2)
|
||||
|
||||
// Delete the first alias.
|
||||
err = aliasStore.DeleteLocalAlias(aliasScid, baseScid)
|
||||
require.NoError(t, err)
|
||||
|
||||
// The link updater should be called.
|
||||
<-updateChan
|
||||
|
||||
// Query the aliases and verify that first one doesn't exist anymore.
|
||||
aliasList = aliasStore.GetAliases(baseScid)
|
||||
require.Len(t, aliasList, 1)
|
||||
require.Contains(t, aliasList, aliasScid2)
|
||||
require.NotContains(t, aliasList, aliasScid)
|
||||
|
||||
// Delete the second alias.
|
||||
err = aliasStore.DeleteLocalAlias(aliasScid2, baseScid)
|
||||
require.NoError(t, err)
|
||||
|
||||
// The link updater should be called.
|
||||
<-updateChan
|
||||
|
||||
// Query the aliases and verify that none exists.
|
||||
aliasList = aliasStore.GetAliases(baseScid)
|
||||
require.Len(t, aliasList, 0)
|
||||
}
|
||||
|
||||
// TestGetNextScid tests that given a current lnwire.ShortChannelID,
|
||||
// getNextScid returns the expected alias to use next.
|
||||
func TestGetNextScid(t *testing.T) {
|
||||
|
7
docs/release-notes/release-notes-0.18.1.md
Normal file
7
docs/release-notes/release-notes-0.18.1.md
Normal file
@ -0,0 +1,7 @@
|
||||
* Some new experimental [RPCs for managing SCID
|
||||
aliases](https://github.com/lightningnetwork/lnd/pull/8509) were added under
|
||||
the routerrpc package. These methods allow manually adding and deleting scid
|
||||
aliases locally to your node.
|
||||
> NOTE: these new RPC methods are marked as experimental
|
||||
(`XAddLocalChanAliases` & `XDeleteLocalChanAliases`) and upon calling
|
||||
them the aliases will not be communicated with the channel peer.
|
@ -36,7 +36,8 @@ type aliasHandler interface {
|
||||
GetPeerAlias(lnwire.ChannelID) (lnwire.ShortChannelID, error)
|
||||
|
||||
// AddLocalAlias persists an alias to an underlying alias store.
|
||||
AddLocalAlias(lnwire.ShortChannelID, lnwire.ShortChannelID, bool) error
|
||||
AddLocalAlias(lnwire.ShortChannelID, lnwire.ShortChannelID, bool,
|
||||
bool) error
|
||||
|
||||
// GetAliases returns the set of aliases given the main SCID of a
|
||||
// channel. This SCID will be an alias for zero-conf channels and will
|
||||
|
@ -1249,7 +1249,7 @@ func (f *Manager) advancePendingChannelState(
|
||||
// Persist the alias to the alias database.
|
||||
baseScid := channel.ShortChannelID
|
||||
err := f.cfg.AliasManager.AddLocalAlias(
|
||||
baseScid, baseScid, true,
|
||||
baseScid, baseScid, true, false,
|
||||
)
|
||||
if err != nil {
|
||||
return fmt.Errorf("error adding local alias to "+
|
||||
@ -3108,7 +3108,7 @@ func (f *Manager) handleFundingConfirmation(
|
||||
}
|
||||
|
||||
err = f.cfg.AliasManager.AddLocalAlias(
|
||||
aliasScid, confChannel.shortChanID, true,
|
||||
aliasScid, confChannel.shortChanID, true, false,
|
||||
)
|
||||
if err != nil {
|
||||
return fmt.Errorf("unable to request alias: %w", err)
|
||||
@ -3274,7 +3274,7 @@ func (f *Manager) sendChannelReady(completeChan *channeldb.OpenChannel,
|
||||
|
||||
err = f.cfg.AliasManager.AddLocalAlias(
|
||||
alias, completeChan.ShortChannelID,
|
||||
false,
|
||||
false, false,
|
||||
)
|
||||
if err != nil {
|
||||
return err
|
||||
@ -3853,7 +3853,7 @@ func (f *Manager) handleChannelReady(peer lnpeer.Peer, //nolint:funlen
|
||||
}
|
||||
|
||||
err = f.cfg.AliasManager.AddLocalAlias(
|
||||
alias, channel.ShortChannelID, false,
|
||||
alias, channel.ShortChannelID, false, false,
|
||||
)
|
||||
if err != nil {
|
||||
log.Errorf("unable to add local alias: %v",
|
||||
|
@ -161,7 +161,7 @@ func (m *mockAliasMgr) GetPeerAlias(lnwire.ChannelID) (lnwire.ShortChannelID,
|
||||
}
|
||||
|
||||
func (m *mockAliasMgr) AddLocalAlias(lnwire.ShortChannelID,
|
||||
lnwire.ShortChannelID, bool) error {
|
||||
lnwire.ShortChannelID, bool, bool) error {
|
||||
|
||||
return nil
|
||||
}
|
||||
|
@ -2343,6 +2343,26 @@ func (s *Switch) addLiveLink(link ChannelLink) {
|
||||
}
|
||||
s.interfaceIndex[peerPub][link.ChanID()] = link
|
||||
|
||||
s.updateLinkAliases(link)
|
||||
}
|
||||
|
||||
// UpdateLinkAliases is the externally exposed wrapper for updating link
|
||||
// aliases. It acquires the indexMtx and calls the internal method.
|
||||
func (s *Switch) UpdateLinkAliases(link ChannelLink) {
|
||||
s.indexMtx.Lock()
|
||||
defer s.indexMtx.Unlock()
|
||||
|
||||
s.updateLinkAliases(link)
|
||||
}
|
||||
|
||||
// updateLinkAliases updates the aliases for a given link. This will cause the
|
||||
// htlcswitch to consult the alias manager on the up to date values of its
|
||||
// alias maps.
|
||||
//
|
||||
// NOTE: this MUST be called with the indexMtx held.
|
||||
func (s *Switch) updateLinkAliases(link ChannelLink) {
|
||||
linkScid := link.ShortChanID()
|
||||
|
||||
aliases := link.getAliases()
|
||||
if link.isZeroConf() {
|
||||
if link.zeroConfConfirmed() {
|
||||
@ -2367,6 +2387,21 @@ func (s *Switch) addLiveLink(link ChannelLink) {
|
||||
s.baseIndex[alias] = linkScid
|
||||
}
|
||||
} else if link.negotiatedAliasFeature() {
|
||||
// First, we flush any alias mappings for this link's scid
|
||||
// before we populate the map again, in order to get rid of old
|
||||
// values that no longer exist.
|
||||
for alias, real := range s.aliasToReal {
|
||||
if real == linkScid {
|
||||
delete(s.aliasToReal, alias)
|
||||
}
|
||||
}
|
||||
|
||||
for alias, real := range s.baseIndex {
|
||||
if real == linkScid {
|
||||
delete(s.baseIndex, alias)
|
||||
}
|
||||
}
|
||||
|
||||
// The link's SCID is the confirmed SCID for non-zero-conf
|
||||
// option-scid-alias feature bit channels.
|
||||
for _, alias := range aliases {
|
||||
@ -2464,11 +2499,16 @@ func (s *Switch) getLinkByMapping(pkt *htlcPacket) (ChannelLink, error) {
|
||||
chanID := pkt.outgoingChanID
|
||||
aliasID := s.cfg.IsAlias(chanID)
|
||||
|
||||
// Custom alias mappings (that aren't communicated over the wire) are
|
||||
// allowed to be outside the range of allowed SCID aliases (so they
|
||||
// return false for IsAlias()).
|
||||
_, haveAliasMapping := s.aliasToReal[chanID]
|
||||
|
||||
// Set the originalOutgoingChanID so the proper channel_update can be
|
||||
// sent back if the option-scid-alias feature bit was negotiated.
|
||||
pkt.originalOutgoingChanID = chanID
|
||||
|
||||
if aliasID {
|
||||
if aliasID || haveAliasMapping {
|
||||
// Since outgoingChanID is an alias, we'll fetch the link via
|
||||
// baseIndex.
|
||||
baseScid, ok := s.baseIndex[chanID]
|
||||
@ -2858,6 +2898,8 @@ func (s *Switch) failMailboxUpdate(outgoingScid,
|
||||
// the associated channel is not one of these, this function will return nil
|
||||
// and the caller is expected to handle this properly. In this case, a return
|
||||
// to the original non-alias behavior is expected.
|
||||
//
|
||||
//nolint:nestif
|
||||
func (s *Switch) failAliasUpdate(scid lnwire.ShortChannelID,
|
||||
incoming bool) *lnwire.ChannelUpdate {
|
||||
|
||||
@ -2865,7 +2907,12 @@ func (s *Switch) failAliasUpdate(scid lnwire.ShortChannelID,
|
||||
// lookups for ChannelUpdate.
|
||||
s.indexMtx.RLock()
|
||||
|
||||
if s.cfg.IsAlias(scid) {
|
||||
// Custom alias mappings (that aren't communicated over the wire) are
|
||||
// allowed to be outside the range of allowed SCID aliases (so they
|
||||
// return false for IsAlias()).
|
||||
_, haveAliasMapping := s.aliasToReal[scid]
|
||||
|
||||
if s.cfg.IsAlias(scid) || haveAliasMapping {
|
||||
// The alias SCID was used. In the incoming case this means
|
||||
// the channel is zero-conf as the link sets the scid. In the
|
||||
// outgoing case, the sender set the scid to use and may be
|
||||
|
@ -334,6 +334,10 @@ var allTestCases = []*lntest.TestCase{
|
||||
Name: "invoice routing hints",
|
||||
TestFunc: testInvoiceRoutingHints,
|
||||
},
|
||||
{
|
||||
Name: "scid alias routing hints",
|
||||
TestFunc: testScidAliasRoutingHints,
|
||||
},
|
||||
{
|
||||
Name: "multi-hop payments over private channels",
|
||||
TestFunc: testMultiHopOverPrivateChannels,
|
||||
|
@ -3,6 +3,7 @@ package itest
|
||||
import (
|
||||
"encoding/hex"
|
||||
"fmt"
|
||||
"math"
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
@ -746,6 +747,162 @@ func testInvoiceRoutingHints(ht *lntest.HarnessTest) {
|
||||
ht.ForceCloseChannel(alice, chanPointEve)
|
||||
}
|
||||
|
||||
// testScidAliasRoutingHints tests that dynamically created aliases via the RPC
|
||||
// are properly used when routing.
|
||||
func testScidAliasRoutingHints(ht *lntest.HarnessTest) {
|
||||
const chanAmt = btcutil.Amount(100000)
|
||||
|
||||
// Option-scid-alias is opt-in, as is anchors.
|
||||
scidAliasArgs := []string{
|
||||
"--protocol.option-scid-alias",
|
||||
"--protocol.anchors",
|
||||
}
|
||||
|
||||
carol := ht.NewNode("Carol", scidAliasArgs)
|
||||
dave := ht.NewNode("Dave", scidAliasArgs)
|
||||
|
||||
ht.FundCoins(btcutil.SatoshiPerBitcoin, carol)
|
||||
ht.FundCoins(btcutil.SatoshiPerBitcoin, dave)
|
||||
|
||||
ht.ConnectNodes(carol, dave)
|
||||
|
||||
// Create a channel between Carol and Dave, which uses the scid alias
|
||||
// feature.
|
||||
chanPointCD := ht.OpenChannel(
|
||||
carol, dave, lntest.OpenChannelParams{
|
||||
Amt: chanAmt,
|
||||
PushAmt: chanAmt / 2,
|
||||
ScidAlias: true,
|
||||
Private: true,
|
||||
},
|
||||
)
|
||||
|
||||
// Find the channel ID of the channel between Carol and Dave.
|
||||
carolDaveChanID := ht.QueryChannelByChanPoint(carol, chanPointCD).ChanId
|
||||
|
||||
ephemeralChanPoint := lnwire.ShortChannelID{
|
||||
BlockHeight: 16_100_000,
|
||||
TxIndex: 1,
|
||||
TxPosition: 1,
|
||||
}
|
||||
|
||||
ephemeralAlias := ephemeralChanPoint.ToUint64()
|
||||
|
||||
// Add the alias to Carol.
|
||||
carol.RPC.XAddLocalChanAliases(&routerrpc.AddAliasesRequest{
|
||||
AliasMaps: []*lnrpc.AliasMap{
|
||||
{
|
||||
BaseScid: carolDaveChanID,
|
||||
Aliases: []uint64{
|
||||
ephemeralAlias,
|
||||
},
|
||||
},
|
||||
},
|
||||
})
|
||||
|
||||
// Add the alias to Dave.
|
||||
dave.RPC.XAddLocalChanAliases(&routerrpc.AddAliasesRequest{
|
||||
AliasMaps: []*lnrpc.AliasMap{
|
||||
{
|
||||
BaseScid: carolDaveChanID,
|
||||
Aliases: []uint64{
|
||||
ephemeralAlias,
|
||||
},
|
||||
},
|
||||
},
|
||||
})
|
||||
|
||||
carolChans := carol.RPC.ListChannels(&lnrpc.ListChannelsRequest{})
|
||||
require.Len(ht, carolChans.Channels, 1, "expected one channel")
|
||||
|
||||
// Get the alias scids for Carol's channel.
|
||||
aliases := carolChans.Channels[0].AliasScids
|
||||
|
||||
// There should be two aliases.
|
||||
require.Len(ht, aliases, 2, "expected two aliases")
|
||||
|
||||
// The ephemeral alias should be included.
|
||||
require.Contains(
|
||||
ht, aliases, ephemeralAlias, "expected ephemeral alias",
|
||||
)
|
||||
|
||||
// List Dave's Channels.
|
||||
daveChans := dave.RPC.ListChannels(&lnrpc.ListChannelsRequest{})
|
||||
|
||||
require.Len(ht, daveChans.Channels, 1, "expected one channel")
|
||||
|
||||
// Get the alias scids for his channel.
|
||||
aliases = daveChans.Channels[0].AliasScids
|
||||
|
||||
// There should be two aliases.
|
||||
require.Len(ht, aliases, 2, "expected two aliases")
|
||||
|
||||
// The ephemeral alias should be included.
|
||||
require.Contains(
|
||||
ht, aliases, ephemeralAlias, "expected ephemeral alias",
|
||||
)
|
||||
|
||||
// Spin up Patrick the payer.
|
||||
patrick := ht.NewNode("Patrick", nil)
|
||||
ht.ConnectNodes(dave, patrick)
|
||||
|
||||
// Connect Patrick with Dave via a public channel.
|
||||
chanPointDP := ht.OpenChannel(
|
||||
dave, patrick, lntest.OpenChannelParams{
|
||||
Amt: chanAmt,
|
||||
PushAmt: chanAmt / 2,
|
||||
},
|
||||
)
|
||||
|
||||
// Create the hop hint that Carol will use to craft her invoice. The
|
||||
// goal here is to define only the ephemeral alias as a hop hint.
|
||||
hopHint := &lnrpc.HopHint{
|
||||
NodeId: dave.PubKeyStr,
|
||||
ChanId: ephemeralAlias,
|
||||
FeeBaseMsat: uint32(
|
||||
chainreg.DefaultBitcoinBaseFeeMSat,
|
||||
),
|
||||
FeeProportionalMillionths: uint32(
|
||||
chainreg.DefaultBitcoinFeeRate,
|
||||
),
|
||||
CltvExpiryDelta: chainreg.DefaultBitcoinTimeLockDelta,
|
||||
}
|
||||
|
||||
// Define the invoice that Carol will add to her node.
|
||||
invoice := &lnrpc.Invoice{
|
||||
Memo: "dynamic alias",
|
||||
Value: int64(chanAmt / 4),
|
||||
RouteHints: []*lnrpc.RouteHint{
|
||||
{
|
||||
HopHints: []*lnrpc.HopHint{hopHint},
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
// Add the invoice and retrieve the payreq.
|
||||
payReq := carol.RPC.AddInvoice(invoice).PaymentRequest
|
||||
|
||||
// Now Patrick will try to pay to that payreq.
|
||||
timeout := time.Second * 15
|
||||
stream := patrick.RPC.SendPayment(&routerrpc.SendPaymentRequest{
|
||||
PaymentRequest: payReq,
|
||||
TimeoutSeconds: int32(timeout.Seconds()),
|
||||
FeeLimitSat: math.MaxInt64,
|
||||
})
|
||||
|
||||
// Payment should eventually succeed.
|
||||
ht.AssertPaymentSucceedWithTimeout(stream, timeout)
|
||||
|
||||
// Check that Carol's invoice appears as settled.
|
||||
invoices := carol.RPC.ListInvoices(&lnrpc.ListInvoiceRequest{})
|
||||
require.Len(ht, invoices.Invoices, 1, "expected one invoice")
|
||||
require.Equal(ht, invoices.Invoices[0].State, lnrpc.Invoice_SETTLED,
|
||||
"expected settled invoice")
|
||||
|
||||
ht.CloseChannel(dave, chanPointDP)
|
||||
ht.CloseChannel(carol, chanPointCD)
|
||||
}
|
||||
|
||||
// testMultiHopOverPrivateChannels tests that private channels can be used as
|
||||
// intermediate hops in a route for payments.
|
||||
func testMultiHopOverPrivateChannels(ht *lntest.HarnessTest) {
|
||||
|
@ -207,3 +207,31 @@ func UnmarshallCoinSelectionStrategy(strategy CoinSelectionStrategy,
|
||||
"%v", strategy)
|
||||
}
|
||||
}
|
||||
|
||||
// ScidAliasMap is a map from a base short channel ID to a set of alias short
|
||||
// channel IDs.
|
||||
type ScidAliasMap map[lnwire.ShortChannelID][]lnwire.ShortChannelID
|
||||
|
||||
// MarshalAliasMap converts a ScidAliasMap to its proto counterpart. This is
|
||||
// used in various RPCs that handle scid alias mappings.
|
||||
func MarshalAliasMap(scidMap ScidAliasMap) []*AliasMap {
|
||||
res := make([]*AliasMap, 0, len(scidMap))
|
||||
|
||||
for base, aliases := range scidMap {
|
||||
rpcMap := &AliasMap{
|
||||
BaseScid: base.ToUint64(),
|
||||
}
|
||||
|
||||
rpcMap.Aliases = make([]uint64, 0, len(aliases))
|
||||
|
||||
for _, alias := range aliases {
|
||||
rpcMap.Aliases = append(
|
||||
rpcMap.Aliases, alias.ToUint64(),
|
||||
)
|
||||
}
|
||||
|
||||
res = append(res, rpcMap)
|
||||
}
|
||||
|
||||
return res
|
||||
}
|
||||
|
@ -1,6 +1,7 @@
|
||||
package routerrpc
|
||||
|
||||
import (
|
||||
"github.com/lightningnetwork/lnd/aliasmgr"
|
||||
"github.com/lightningnetwork/lnd/macaroons"
|
||||
"github.com/lightningnetwork/lnd/routing"
|
||||
)
|
||||
@ -46,6 +47,10 @@ type Config struct {
|
||||
// RouterBackend contains shared logic between this sub server and the
|
||||
// main rpc server.
|
||||
RouterBackend *RouterBackend
|
||||
|
||||
// AliasMgr is the alias manager instance that is used to handle all the
|
||||
// scid alias related information for channels.
|
||||
AliasMgr *aliasmgr.Manager
|
||||
}
|
||||
|
||||
// DefaultConfig defines the config defaults.
|
||||
|
@ -3370,6 +3370,194 @@ func (*UpdateChanStatusResponse) Descriptor() ([]byte, []int) {
|
||||
return file_routerrpc_router_proto_rawDescGZIP(), []int{40}
|
||||
}
|
||||
|
||||
type AddAliasesRequest struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
AliasMaps []*lnrpc.AliasMap `protobuf:"bytes,1,rep,name=alias_maps,json=aliasMaps,proto3" json:"alias_maps,omitempty"`
|
||||
}
|
||||
|
||||
func (x *AddAliasesRequest) Reset() {
|
||||
*x = AddAliasesRequest{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_routerrpc_router_proto_msgTypes[41]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *AddAliasesRequest) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*AddAliasesRequest) ProtoMessage() {}
|
||||
|
||||
func (x *AddAliasesRequest) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_routerrpc_router_proto_msgTypes[41]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use AddAliasesRequest.ProtoReflect.Descriptor instead.
|
||||
func (*AddAliasesRequest) Descriptor() ([]byte, []int) {
|
||||
return file_routerrpc_router_proto_rawDescGZIP(), []int{41}
|
||||
}
|
||||
|
||||
func (x *AddAliasesRequest) GetAliasMaps() []*lnrpc.AliasMap {
|
||||
if x != nil {
|
||||
return x.AliasMaps
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
type AddAliasesResponse struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
AliasMaps []*lnrpc.AliasMap `protobuf:"bytes,1,rep,name=alias_maps,json=aliasMaps,proto3" json:"alias_maps,omitempty"`
|
||||
}
|
||||
|
||||
func (x *AddAliasesResponse) Reset() {
|
||||
*x = AddAliasesResponse{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_routerrpc_router_proto_msgTypes[42]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *AddAliasesResponse) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*AddAliasesResponse) ProtoMessage() {}
|
||||
|
||||
func (x *AddAliasesResponse) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_routerrpc_router_proto_msgTypes[42]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use AddAliasesResponse.ProtoReflect.Descriptor instead.
|
||||
func (*AddAliasesResponse) Descriptor() ([]byte, []int) {
|
||||
return file_routerrpc_router_proto_rawDescGZIP(), []int{42}
|
||||
}
|
||||
|
||||
func (x *AddAliasesResponse) GetAliasMaps() []*lnrpc.AliasMap {
|
||||
if x != nil {
|
||||
return x.AliasMaps
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
type DeleteAliasesRequest struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
AliasMaps []*lnrpc.AliasMap `protobuf:"bytes,1,rep,name=alias_maps,json=aliasMaps,proto3" json:"alias_maps,omitempty"`
|
||||
}
|
||||
|
||||
func (x *DeleteAliasesRequest) Reset() {
|
||||
*x = DeleteAliasesRequest{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_routerrpc_router_proto_msgTypes[43]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *DeleteAliasesRequest) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*DeleteAliasesRequest) ProtoMessage() {}
|
||||
|
||||
func (x *DeleteAliasesRequest) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_routerrpc_router_proto_msgTypes[43]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use DeleteAliasesRequest.ProtoReflect.Descriptor instead.
|
||||
func (*DeleteAliasesRequest) Descriptor() ([]byte, []int) {
|
||||
return file_routerrpc_router_proto_rawDescGZIP(), []int{43}
|
||||
}
|
||||
|
||||
func (x *DeleteAliasesRequest) GetAliasMaps() []*lnrpc.AliasMap {
|
||||
if x != nil {
|
||||
return x.AliasMaps
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
type DeleteAliasesResponse struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
AliasMaps []*lnrpc.AliasMap `protobuf:"bytes,1,rep,name=alias_maps,json=aliasMaps,proto3" json:"alias_maps,omitempty"`
|
||||
}
|
||||
|
||||
func (x *DeleteAliasesResponse) Reset() {
|
||||
*x = DeleteAliasesResponse{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_routerrpc_router_proto_msgTypes[44]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *DeleteAliasesResponse) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*DeleteAliasesResponse) ProtoMessage() {}
|
||||
|
||||
func (x *DeleteAliasesResponse) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_routerrpc_router_proto_msgTypes[44]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use DeleteAliasesResponse.ProtoReflect.Descriptor instead.
|
||||
func (*DeleteAliasesResponse) Descriptor() ([]byte, []int) {
|
||||
return file_routerrpc_router_proto_rawDescGZIP(), []int{44}
|
||||
}
|
||||
|
||||
func (x *DeleteAliasesResponse) GetAliasMaps() []*lnrpc.AliasMap {
|
||||
if x != nil {
|
||||
return x.AliasMaps
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
var File_routerrpc_router_proto protoreflect.FileDescriptor
|
||||
|
||||
var file_routerrpc_router_proto_rawDesc = []byte{
|
||||
@ -3809,162 +3997,191 @@ var file_routerrpc_router_proto_rawDesc = []byte{
|
||||
0x65, 0x72, 0x72, 0x70, 0x63, 0x2e, 0x43, 0x68, 0x61, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73,
|
||||
0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x06, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x1a,
|
||||
0x0a, 0x18, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x43, 0x68, 0x61, 0x6e, 0x53, 0x74, 0x61, 0x74,
|
||||
0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2a, 0x81, 0x04, 0x0a, 0x0d, 0x46,
|
||||
0x61, 0x69, 0x6c, 0x75, 0x72, 0x65, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x12, 0x0b, 0x0a, 0x07,
|
||||
0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x0d, 0x0a, 0x09, 0x4e, 0x4f, 0x5f,
|
||||
0x44, 0x45, 0x54, 0x41, 0x49, 0x4c, 0x10, 0x01, 0x12, 0x10, 0x0a, 0x0c, 0x4f, 0x4e, 0x49, 0x4f,
|
||||
0x4e, 0x5f, 0x44, 0x45, 0x43, 0x4f, 0x44, 0x45, 0x10, 0x02, 0x12, 0x15, 0x0a, 0x11, 0x4c, 0x49,
|
||||
0x4e, 0x4b, 0x5f, 0x4e, 0x4f, 0x54, 0x5f, 0x45, 0x4c, 0x49, 0x47, 0x49, 0x42, 0x4c, 0x45, 0x10,
|
||||
0x03, 0x12, 0x14, 0x0a, 0x10, 0x4f, 0x4e, 0x5f, 0x43, 0x48, 0x41, 0x49, 0x4e, 0x5f, 0x54, 0x49,
|
||||
0x4d, 0x45, 0x4f, 0x55, 0x54, 0x10, 0x04, 0x12, 0x14, 0x0a, 0x10, 0x48, 0x54, 0x4c, 0x43, 0x5f,
|
||||
0x45, 0x58, 0x43, 0x45, 0x45, 0x44, 0x53, 0x5f, 0x4d, 0x41, 0x58, 0x10, 0x05, 0x12, 0x18, 0x0a,
|
||||
0x14, 0x49, 0x4e, 0x53, 0x55, 0x46, 0x46, 0x49, 0x43, 0x49, 0x45, 0x4e, 0x54, 0x5f, 0x42, 0x41,
|
||||
0x4c, 0x41, 0x4e, 0x43, 0x45, 0x10, 0x06, 0x12, 0x16, 0x0a, 0x12, 0x49, 0x4e, 0x43, 0x4f, 0x4d,
|
||||
0x50, 0x4c, 0x45, 0x54, 0x45, 0x5f, 0x46, 0x4f, 0x52, 0x57, 0x41, 0x52, 0x44, 0x10, 0x07, 0x12,
|
||||
0x13, 0x0a, 0x0f, 0x48, 0x54, 0x4c, 0x43, 0x5f, 0x41, 0x44, 0x44, 0x5f, 0x46, 0x41, 0x49, 0x4c,
|
||||
0x45, 0x44, 0x10, 0x08, 0x12, 0x15, 0x0a, 0x11, 0x46, 0x4f, 0x52, 0x57, 0x41, 0x52, 0x44, 0x53,
|
||||
0x5f, 0x44, 0x49, 0x53, 0x41, 0x42, 0x4c, 0x45, 0x44, 0x10, 0x09, 0x12, 0x14, 0x0a, 0x10, 0x49,
|
||||
0x4e, 0x56, 0x4f, 0x49, 0x43, 0x45, 0x5f, 0x43, 0x41, 0x4e, 0x43, 0x45, 0x4c, 0x45, 0x44, 0x10,
|
||||
0x0a, 0x12, 0x15, 0x0a, 0x11, 0x49, 0x4e, 0x56, 0x4f, 0x49, 0x43, 0x45, 0x5f, 0x55, 0x4e, 0x44,
|
||||
0x45, 0x52, 0x50, 0x41, 0x49, 0x44, 0x10, 0x0b, 0x12, 0x1b, 0x0a, 0x17, 0x49, 0x4e, 0x56, 0x4f,
|
||||
0x49, 0x43, 0x45, 0x5f, 0x45, 0x58, 0x50, 0x49, 0x52, 0x59, 0x5f, 0x54, 0x4f, 0x4f, 0x5f, 0x53,
|
||||
0x4f, 0x4f, 0x4e, 0x10, 0x0c, 0x12, 0x14, 0x0a, 0x10, 0x49, 0x4e, 0x56, 0x4f, 0x49, 0x43, 0x45,
|
||||
0x5f, 0x4e, 0x4f, 0x54, 0x5f, 0x4f, 0x50, 0x45, 0x4e, 0x10, 0x0d, 0x12, 0x17, 0x0a, 0x13, 0x4d,
|
||||
0x50, 0x50, 0x5f, 0x49, 0x4e, 0x56, 0x4f, 0x49, 0x43, 0x45, 0x5f, 0x54, 0x49, 0x4d, 0x45, 0x4f,
|
||||
0x55, 0x54, 0x10, 0x0e, 0x12, 0x14, 0x0a, 0x10, 0x41, 0x44, 0x44, 0x52, 0x45, 0x53, 0x53, 0x5f,
|
||||
0x4d, 0x49, 0x53, 0x4d, 0x41, 0x54, 0x43, 0x48, 0x10, 0x0f, 0x12, 0x16, 0x0a, 0x12, 0x53, 0x45,
|
||||
0x54, 0x5f, 0x54, 0x4f, 0x54, 0x41, 0x4c, 0x5f, 0x4d, 0x49, 0x53, 0x4d, 0x41, 0x54, 0x43, 0x48,
|
||||
0x10, 0x10, 0x12, 0x15, 0x0a, 0x11, 0x53, 0x45, 0x54, 0x5f, 0x54, 0x4f, 0x54, 0x41, 0x4c, 0x5f,
|
||||
0x54, 0x4f, 0x4f, 0x5f, 0x4c, 0x4f, 0x57, 0x10, 0x11, 0x12, 0x10, 0x0a, 0x0c, 0x53, 0x45, 0x54,
|
||||
0x5f, 0x4f, 0x56, 0x45, 0x52, 0x50, 0x41, 0x49, 0x44, 0x10, 0x12, 0x12, 0x13, 0x0a, 0x0f, 0x55,
|
||||
0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x5f, 0x49, 0x4e, 0x56, 0x4f, 0x49, 0x43, 0x45, 0x10, 0x13,
|
||||
0x12, 0x13, 0x0a, 0x0f, 0x49, 0x4e, 0x56, 0x41, 0x4c, 0x49, 0x44, 0x5f, 0x4b, 0x45, 0x59, 0x53,
|
||||
0x45, 0x4e, 0x44, 0x10, 0x14, 0x12, 0x13, 0x0a, 0x0f, 0x4d, 0x50, 0x50, 0x5f, 0x49, 0x4e, 0x5f,
|
||||
0x50, 0x52, 0x4f, 0x47, 0x52, 0x45, 0x53, 0x53, 0x10, 0x15, 0x12, 0x12, 0x0a, 0x0e, 0x43, 0x49,
|
||||
0x52, 0x43, 0x55, 0x4c, 0x41, 0x52, 0x5f, 0x52, 0x4f, 0x55, 0x54, 0x45, 0x10, 0x16, 0x2a, 0xae,
|
||||
0x01, 0x0a, 0x0c, 0x50, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12,
|
||||
0x0d, 0x0a, 0x09, 0x49, 0x4e, 0x5f, 0x46, 0x4c, 0x49, 0x47, 0x48, 0x54, 0x10, 0x00, 0x12, 0x0d,
|
||||
0x0a, 0x09, 0x53, 0x55, 0x43, 0x43, 0x45, 0x45, 0x44, 0x45, 0x44, 0x10, 0x01, 0x12, 0x12, 0x0a,
|
||||
0x0e, 0x46, 0x41, 0x49, 0x4c, 0x45, 0x44, 0x5f, 0x54, 0x49, 0x4d, 0x45, 0x4f, 0x55, 0x54, 0x10,
|
||||
0x02, 0x12, 0x13, 0x0a, 0x0f, 0x46, 0x41, 0x49, 0x4c, 0x45, 0x44, 0x5f, 0x4e, 0x4f, 0x5f, 0x52,
|
||||
0x4f, 0x55, 0x54, 0x45, 0x10, 0x03, 0x12, 0x10, 0x0a, 0x0c, 0x46, 0x41, 0x49, 0x4c, 0x45, 0x44,
|
||||
0x5f, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x10, 0x04, 0x12, 0x24, 0x0a, 0x20, 0x46, 0x41, 0x49, 0x4c,
|
||||
0x45, 0x44, 0x5f, 0x49, 0x4e, 0x43, 0x4f, 0x52, 0x52, 0x45, 0x43, 0x54, 0x5f, 0x50, 0x41, 0x59,
|
||||
0x4d, 0x45, 0x4e, 0x54, 0x5f, 0x44, 0x45, 0x54, 0x41, 0x49, 0x4c, 0x53, 0x10, 0x05, 0x12, 0x1f,
|
||||
0x0a, 0x1b, 0x46, 0x41, 0x49, 0x4c, 0x45, 0x44, 0x5f, 0x49, 0x4e, 0x53, 0x55, 0x46, 0x46, 0x49,
|
||||
0x43, 0x49, 0x45, 0x4e, 0x54, 0x5f, 0x42, 0x41, 0x4c, 0x41, 0x4e, 0x43, 0x45, 0x10, 0x06, 0x2a,
|
||||
0x51, 0x0a, 0x18, 0x52, 0x65, 0x73, 0x6f, 0x6c, 0x76, 0x65, 0x48, 0x6f, 0x6c, 0x64, 0x46, 0x6f,
|
||||
0x72, 0x77, 0x61, 0x72, 0x64, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x0a, 0x0a, 0x06, 0x53,
|
||||
0x45, 0x54, 0x54, 0x4c, 0x45, 0x10, 0x00, 0x12, 0x08, 0x0a, 0x04, 0x46, 0x41, 0x49, 0x4c, 0x10,
|
||||
0x01, 0x12, 0x0a, 0x0a, 0x06, 0x52, 0x45, 0x53, 0x55, 0x4d, 0x45, 0x10, 0x02, 0x12, 0x13, 0x0a,
|
||||
0x0f, 0x52, 0x45, 0x53, 0x55, 0x4d, 0x45, 0x5f, 0x4d, 0x4f, 0x44, 0x49, 0x46, 0x49, 0x45, 0x44,
|
||||
0x10, 0x03, 0x2a, 0x35, 0x0a, 0x10, 0x43, 0x68, 0x61, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73,
|
||||
0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x0a, 0x0a, 0x06, 0x45, 0x4e, 0x41, 0x42, 0x4c, 0x45,
|
||||
0x10, 0x00, 0x12, 0x0b, 0x0a, 0x07, 0x44, 0x49, 0x53, 0x41, 0x42, 0x4c, 0x45, 0x10, 0x01, 0x12,
|
||||
0x08, 0x0a, 0x04, 0x41, 0x55, 0x54, 0x4f, 0x10, 0x02, 0x32, 0xb5, 0x0c, 0x0a, 0x06, 0x52, 0x6f,
|
||||
0x75, 0x74, 0x65, 0x72, 0x12, 0x40, 0x0a, 0x0d, 0x53, 0x65, 0x6e, 0x64, 0x50, 0x61, 0x79, 0x6d,
|
||||
0x65, 0x6e, 0x74, 0x56, 0x32, 0x12, 0x1d, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x72, 0x72, 0x70,
|
||||
0x63, 0x2e, 0x53, 0x65, 0x6e, 0x64, 0x50, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x71,
|
||||
0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x43, 0x0a, 0x11, 0x41, 0x64,
|
||||
0x64, 0x41, 0x6c, 0x69, 0x61, 0x73, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12,
|
||||
0x2e, 0x0a, 0x0a, 0x61, 0x6c, 0x69, 0x61, 0x73, 0x5f, 0x6d, 0x61, 0x70, 0x73, 0x18, 0x01, 0x20,
|
||||
0x03, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x6c, 0x6e, 0x72, 0x70, 0x63, 0x2e, 0x41, 0x6c, 0x69, 0x61,
|
||||
0x73, 0x4d, 0x61, 0x70, 0x52, 0x09, 0x61, 0x6c, 0x69, 0x61, 0x73, 0x4d, 0x61, 0x70, 0x73, 0x22,
|
||||
0x44, 0x0a, 0x12, 0x41, 0x64, 0x64, 0x41, 0x6c, 0x69, 0x61, 0x73, 0x65, 0x73, 0x52, 0x65, 0x73,
|
||||
0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2e, 0x0a, 0x0a, 0x61, 0x6c, 0x69, 0x61, 0x73, 0x5f, 0x6d,
|
||||
0x61, 0x70, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x6c, 0x6e, 0x72, 0x70,
|
||||
0x63, 0x2e, 0x41, 0x6c, 0x69, 0x61, 0x73, 0x4d, 0x61, 0x70, 0x52, 0x09, 0x61, 0x6c, 0x69, 0x61,
|
||||
0x73, 0x4d, 0x61, 0x70, 0x73, 0x22, 0x46, 0x0a, 0x14, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x41,
|
||||
0x6c, 0x69, 0x61, 0x73, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x2e, 0x0a,
|
||||
0x0a, 0x61, 0x6c, 0x69, 0x61, 0x73, 0x5f, 0x6d, 0x61, 0x70, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28,
|
||||
0x0b, 0x32, 0x0f, 0x2e, 0x6c, 0x6e, 0x72, 0x70, 0x63, 0x2e, 0x41, 0x6c, 0x69, 0x61, 0x73, 0x4d,
|
||||
0x61, 0x70, 0x52, 0x09, 0x61, 0x6c, 0x69, 0x61, 0x73, 0x4d, 0x61, 0x70, 0x73, 0x22, 0x47, 0x0a,
|
||||
0x15, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x41, 0x6c, 0x69, 0x61, 0x73, 0x65, 0x73, 0x52, 0x65,
|
||||
0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2e, 0x0a, 0x0a, 0x61, 0x6c, 0x69, 0x61, 0x73, 0x5f,
|
||||
0x6d, 0x61, 0x70, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x6c, 0x6e, 0x72,
|
||||
0x70, 0x63, 0x2e, 0x41, 0x6c, 0x69, 0x61, 0x73, 0x4d, 0x61, 0x70, 0x52, 0x09, 0x61, 0x6c, 0x69,
|
||||
0x61, 0x73, 0x4d, 0x61, 0x70, 0x73, 0x2a, 0x81, 0x04, 0x0a, 0x0d, 0x46, 0x61, 0x69, 0x6c, 0x75,
|
||||
0x72, 0x65, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x12, 0x0b, 0x0a, 0x07, 0x55, 0x4e, 0x4b, 0x4e,
|
||||
0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x0d, 0x0a, 0x09, 0x4e, 0x4f, 0x5f, 0x44, 0x45, 0x54, 0x41,
|
||||
0x49, 0x4c, 0x10, 0x01, 0x12, 0x10, 0x0a, 0x0c, 0x4f, 0x4e, 0x49, 0x4f, 0x4e, 0x5f, 0x44, 0x45,
|
||||
0x43, 0x4f, 0x44, 0x45, 0x10, 0x02, 0x12, 0x15, 0x0a, 0x11, 0x4c, 0x49, 0x4e, 0x4b, 0x5f, 0x4e,
|
||||
0x4f, 0x54, 0x5f, 0x45, 0x4c, 0x49, 0x47, 0x49, 0x42, 0x4c, 0x45, 0x10, 0x03, 0x12, 0x14, 0x0a,
|
||||
0x10, 0x4f, 0x4e, 0x5f, 0x43, 0x48, 0x41, 0x49, 0x4e, 0x5f, 0x54, 0x49, 0x4d, 0x45, 0x4f, 0x55,
|
||||
0x54, 0x10, 0x04, 0x12, 0x14, 0x0a, 0x10, 0x48, 0x54, 0x4c, 0x43, 0x5f, 0x45, 0x58, 0x43, 0x45,
|
||||
0x45, 0x44, 0x53, 0x5f, 0x4d, 0x41, 0x58, 0x10, 0x05, 0x12, 0x18, 0x0a, 0x14, 0x49, 0x4e, 0x53,
|
||||
0x55, 0x46, 0x46, 0x49, 0x43, 0x49, 0x45, 0x4e, 0x54, 0x5f, 0x42, 0x41, 0x4c, 0x41, 0x4e, 0x43,
|
||||
0x45, 0x10, 0x06, 0x12, 0x16, 0x0a, 0x12, 0x49, 0x4e, 0x43, 0x4f, 0x4d, 0x50, 0x4c, 0x45, 0x54,
|
||||
0x45, 0x5f, 0x46, 0x4f, 0x52, 0x57, 0x41, 0x52, 0x44, 0x10, 0x07, 0x12, 0x13, 0x0a, 0x0f, 0x48,
|
||||
0x54, 0x4c, 0x43, 0x5f, 0x41, 0x44, 0x44, 0x5f, 0x46, 0x41, 0x49, 0x4c, 0x45, 0x44, 0x10, 0x08,
|
||||
0x12, 0x15, 0x0a, 0x11, 0x46, 0x4f, 0x52, 0x57, 0x41, 0x52, 0x44, 0x53, 0x5f, 0x44, 0x49, 0x53,
|
||||
0x41, 0x42, 0x4c, 0x45, 0x44, 0x10, 0x09, 0x12, 0x14, 0x0a, 0x10, 0x49, 0x4e, 0x56, 0x4f, 0x49,
|
||||
0x43, 0x45, 0x5f, 0x43, 0x41, 0x4e, 0x43, 0x45, 0x4c, 0x45, 0x44, 0x10, 0x0a, 0x12, 0x15, 0x0a,
|
||||
0x11, 0x49, 0x4e, 0x56, 0x4f, 0x49, 0x43, 0x45, 0x5f, 0x55, 0x4e, 0x44, 0x45, 0x52, 0x50, 0x41,
|
||||
0x49, 0x44, 0x10, 0x0b, 0x12, 0x1b, 0x0a, 0x17, 0x49, 0x4e, 0x56, 0x4f, 0x49, 0x43, 0x45, 0x5f,
|
||||
0x45, 0x58, 0x50, 0x49, 0x52, 0x59, 0x5f, 0x54, 0x4f, 0x4f, 0x5f, 0x53, 0x4f, 0x4f, 0x4e, 0x10,
|
||||
0x0c, 0x12, 0x14, 0x0a, 0x10, 0x49, 0x4e, 0x56, 0x4f, 0x49, 0x43, 0x45, 0x5f, 0x4e, 0x4f, 0x54,
|
||||
0x5f, 0x4f, 0x50, 0x45, 0x4e, 0x10, 0x0d, 0x12, 0x17, 0x0a, 0x13, 0x4d, 0x50, 0x50, 0x5f, 0x49,
|
||||
0x4e, 0x56, 0x4f, 0x49, 0x43, 0x45, 0x5f, 0x54, 0x49, 0x4d, 0x45, 0x4f, 0x55, 0x54, 0x10, 0x0e,
|
||||
0x12, 0x14, 0x0a, 0x10, 0x41, 0x44, 0x44, 0x52, 0x45, 0x53, 0x53, 0x5f, 0x4d, 0x49, 0x53, 0x4d,
|
||||
0x41, 0x54, 0x43, 0x48, 0x10, 0x0f, 0x12, 0x16, 0x0a, 0x12, 0x53, 0x45, 0x54, 0x5f, 0x54, 0x4f,
|
||||
0x54, 0x41, 0x4c, 0x5f, 0x4d, 0x49, 0x53, 0x4d, 0x41, 0x54, 0x43, 0x48, 0x10, 0x10, 0x12, 0x15,
|
||||
0x0a, 0x11, 0x53, 0x45, 0x54, 0x5f, 0x54, 0x4f, 0x54, 0x41, 0x4c, 0x5f, 0x54, 0x4f, 0x4f, 0x5f,
|
||||
0x4c, 0x4f, 0x57, 0x10, 0x11, 0x12, 0x10, 0x0a, 0x0c, 0x53, 0x45, 0x54, 0x5f, 0x4f, 0x56, 0x45,
|
||||
0x52, 0x50, 0x41, 0x49, 0x44, 0x10, 0x12, 0x12, 0x13, 0x0a, 0x0f, 0x55, 0x4e, 0x4b, 0x4e, 0x4f,
|
||||
0x57, 0x4e, 0x5f, 0x49, 0x4e, 0x56, 0x4f, 0x49, 0x43, 0x45, 0x10, 0x13, 0x12, 0x13, 0x0a, 0x0f,
|
||||
0x49, 0x4e, 0x56, 0x41, 0x4c, 0x49, 0x44, 0x5f, 0x4b, 0x45, 0x59, 0x53, 0x45, 0x4e, 0x44, 0x10,
|
||||
0x14, 0x12, 0x13, 0x0a, 0x0f, 0x4d, 0x50, 0x50, 0x5f, 0x49, 0x4e, 0x5f, 0x50, 0x52, 0x4f, 0x47,
|
||||
0x52, 0x45, 0x53, 0x53, 0x10, 0x15, 0x12, 0x12, 0x0a, 0x0e, 0x43, 0x49, 0x52, 0x43, 0x55, 0x4c,
|
||||
0x41, 0x52, 0x5f, 0x52, 0x4f, 0x55, 0x54, 0x45, 0x10, 0x16, 0x2a, 0xae, 0x01, 0x0a, 0x0c, 0x50,
|
||||
0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x0d, 0x0a, 0x09, 0x49,
|
||||
0x4e, 0x5f, 0x46, 0x4c, 0x49, 0x47, 0x48, 0x54, 0x10, 0x00, 0x12, 0x0d, 0x0a, 0x09, 0x53, 0x55,
|
||||
0x43, 0x43, 0x45, 0x45, 0x44, 0x45, 0x44, 0x10, 0x01, 0x12, 0x12, 0x0a, 0x0e, 0x46, 0x41, 0x49,
|
||||
0x4c, 0x45, 0x44, 0x5f, 0x54, 0x49, 0x4d, 0x45, 0x4f, 0x55, 0x54, 0x10, 0x02, 0x12, 0x13, 0x0a,
|
||||
0x0f, 0x46, 0x41, 0x49, 0x4c, 0x45, 0x44, 0x5f, 0x4e, 0x4f, 0x5f, 0x52, 0x4f, 0x55, 0x54, 0x45,
|
||||
0x10, 0x03, 0x12, 0x10, 0x0a, 0x0c, 0x46, 0x41, 0x49, 0x4c, 0x45, 0x44, 0x5f, 0x45, 0x52, 0x52,
|
||||
0x4f, 0x52, 0x10, 0x04, 0x12, 0x24, 0x0a, 0x20, 0x46, 0x41, 0x49, 0x4c, 0x45, 0x44, 0x5f, 0x49,
|
||||
0x4e, 0x43, 0x4f, 0x52, 0x52, 0x45, 0x43, 0x54, 0x5f, 0x50, 0x41, 0x59, 0x4d, 0x45, 0x4e, 0x54,
|
||||
0x5f, 0x44, 0x45, 0x54, 0x41, 0x49, 0x4c, 0x53, 0x10, 0x05, 0x12, 0x1f, 0x0a, 0x1b, 0x46, 0x41,
|
||||
0x49, 0x4c, 0x45, 0x44, 0x5f, 0x49, 0x4e, 0x53, 0x55, 0x46, 0x46, 0x49, 0x43, 0x49, 0x45, 0x4e,
|
||||
0x54, 0x5f, 0x42, 0x41, 0x4c, 0x41, 0x4e, 0x43, 0x45, 0x10, 0x06, 0x2a, 0x51, 0x0a, 0x18, 0x52,
|
||||
0x65, 0x73, 0x6f, 0x6c, 0x76, 0x65, 0x48, 0x6f, 0x6c, 0x64, 0x46, 0x6f, 0x72, 0x77, 0x61, 0x72,
|
||||
0x64, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x0a, 0x0a, 0x06, 0x53, 0x45, 0x54, 0x54, 0x4c,
|
||||
0x45, 0x10, 0x00, 0x12, 0x08, 0x0a, 0x04, 0x46, 0x41, 0x49, 0x4c, 0x10, 0x01, 0x12, 0x0a, 0x0a,
|
||||
0x06, 0x52, 0x45, 0x53, 0x55, 0x4d, 0x45, 0x10, 0x02, 0x12, 0x13, 0x0a, 0x0f, 0x52, 0x45, 0x53,
|
||||
0x55, 0x4d, 0x45, 0x5f, 0x4d, 0x4f, 0x44, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x03, 0x2a, 0x35,
|
||||
0x0a, 0x10, 0x43, 0x68, 0x61, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x41, 0x63, 0x74, 0x69,
|
||||
0x6f, 0x6e, 0x12, 0x0a, 0x0a, 0x06, 0x45, 0x4e, 0x41, 0x42, 0x4c, 0x45, 0x10, 0x00, 0x12, 0x0b,
|
||||
0x0a, 0x07, 0x44, 0x49, 0x53, 0x41, 0x42, 0x4c, 0x45, 0x10, 0x01, 0x12, 0x08, 0x0a, 0x04, 0x41,
|
||||
0x55, 0x54, 0x4f, 0x10, 0x02, 0x32, 0xe8, 0x0d, 0x0a, 0x06, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x72,
|
||||
0x12, 0x40, 0x0a, 0x0d, 0x53, 0x65, 0x6e, 0x64, 0x50, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x56,
|
||||
0x32, 0x12, 0x1d, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x72, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x65,
|
||||
0x6e, 0x64, 0x50, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74,
|
||||
0x1a, 0x0e, 0x2e, 0x6c, 0x6e, 0x72, 0x70, 0x63, 0x2e, 0x50, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74,
|
||||
0x30, 0x01, 0x12, 0x42, 0x0a, 0x0e, 0x54, 0x72, 0x61, 0x63, 0x6b, 0x50, 0x61, 0x79, 0x6d, 0x65,
|
||||
0x6e, 0x74, 0x56, 0x32, 0x12, 0x1e, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x72, 0x72, 0x70, 0x63,
|
||||
0x2e, 0x54, 0x72, 0x61, 0x63, 0x6b, 0x50, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x71,
|
||||
0x75, 0x65, 0x73, 0x74, 0x1a, 0x0e, 0x2e, 0x6c, 0x6e, 0x72, 0x70, 0x63, 0x2e, 0x50, 0x61, 0x79,
|
||||
0x6d, 0x65, 0x6e, 0x74, 0x30, 0x01, 0x12, 0x42, 0x0a, 0x0e, 0x54, 0x72, 0x61, 0x63, 0x6b, 0x50,
|
||||
0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x56, 0x32, 0x12, 0x1e, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65,
|
||||
0x72, 0x72, 0x70, 0x63, 0x2e, 0x54, 0x72, 0x61, 0x63, 0x6b, 0x50, 0x61, 0x79, 0x6d, 0x65, 0x6e,
|
||||
0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0e, 0x2e, 0x6c, 0x6e, 0x72, 0x70, 0x63,
|
||||
0x2e, 0x50, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x30, 0x01, 0x12, 0x42, 0x0a, 0x0d, 0x54, 0x72,
|
||||
0x61, 0x63, 0x6b, 0x50, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x12, 0x1f, 0x2e, 0x72, 0x6f,
|
||||
0x75, 0x74, 0x65, 0x72, 0x72, 0x70, 0x63, 0x2e, 0x54, 0x72, 0x61, 0x63, 0x6b, 0x50, 0x61, 0x79,
|
||||
0x6d, 0x65, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0e, 0x2e, 0x6c,
|
||||
0x6e, 0x72, 0x70, 0x63, 0x2e, 0x50, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x30, 0x01, 0x12, 0x4b,
|
||||
0x0a, 0x10, 0x45, 0x73, 0x74, 0x69, 0x6d, 0x61, 0x74, 0x65, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x46,
|
||||
0x65, 0x65, 0x12, 0x1a, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x72, 0x72, 0x70, 0x63, 0x2e, 0x52,
|
||||
0x6f, 0x75, 0x74, 0x65, 0x46, 0x65, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1b,
|
||||
0x6d, 0x65, 0x6e, 0x74, 0x30, 0x01, 0x12, 0x42, 0x0a, 0x0d, 0x54, 0x72, 0x61, 0x63, 0x6b, 0x50,
|
||||
0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x12, 0x1f, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x72,
|
||||
0x72, 0x70, 0x63, 0x2e, 0x54, 0x72, 0x61, 0x63, 0x6b, 0x50, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74,
|
||||
0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0e, 0x2e, 0x6c, 0x6e, 0x72, 0x70, 0x63,
|
||||
0x2e, 0x50, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x30, 0x01, 0x12, 0x4b, 0x0a, 0x10, 0x45, 0x73,
|
||||
0x74, 0x69, 0x6d, 0x61, 0x74, 0x65, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x46, 0x65, 0x65, 0x12, 0x1a,
|
||||
0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x72, 0x72, 0x70, 0x63, 0x2e, 0x52, 0x6f, 0x75, 0x74, 0x65,
|
||||
0x46, 0x65, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x51, 0x0a, 0x0b, 0x53,
|
||||
0x65, 0x6e, 0x64, 0x54, 0x6f, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x12, 0x1d, 0x2e, 0x72, 0x6f, 0x75,
|
||||
0x74, 0x65, 0x72, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x65, 0x6e, 0x64, 0x54, 0x6f, 0x52, 0x6f, 0x75,
|
||||
0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1e, 0x2e, 0x72, 0x6f, 0x75, 0x74,
|
||||
0x65, 0x72, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x65, 0x6e, 0x64, 0x54, 0x6f, 0x52, 0x6f, 0x75, 0x74,
|
||||
0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x03, 0x88, 0x02, 0x01, 0x12, 0x42,
|
||||
0x0a, 0x0d, 0x53, 0x65, 0x6e, 0x64, 0x54, 0x6f, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x56, 0x32, 0x12,
|
||||
0x1d, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x72, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x65, 0x6e, 0x64,
|
||||
0x54, 0x6f, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x12,
|
||||
0x2e, 0x6c, 0x6e, 0x72, 0x70, 0x63, 0x2e, 0x48, 0x54, 0x4c, 0x43, 0x41, 0x74, 0x74, 0x65, 0x6d,
|
||||
0x70, 0x74, 0x12, 0x64, 0x0a, 0x13, 0x52, 0x65, 0x73, 0x65, 0x74, 0x4d, 0x69, 0x73, 0x73, 0x69,
|
||||
0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x12, 0x25, 0x2e, 0x72, 0x6f, 0x75, 0x74,
|
||||
0x65, 0x72, 0x72, 0x70, 0x63, 0x2e, 0x52, 0x65, 0x73, 0x65, 0x74, 0x4d, 0x69, 0x73, 0x73, 0x69,
|
||||
0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74,
|
||||
0x1a, 0x26, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x72, 0x72, 0x70, 0x63, 0x2e, 0x52, 0x65, 0x73,
|
||||
0x65, 0x74, 0x4d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c,
|
||||
0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x64, 0x0a, 0x13, 0x51, 0x75, 0x65, 0x72,
|
||||
0x79, 0x4d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x12,
|
||||
0x25, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x72, 0x72, 0x70, 0x63, 0x2e, 0x51, 0x75, 0x65, 0x72,
|
||||
0x79, 0x4d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x52,
|
||||
0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x26, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x72, 0x72,
|
||||
0x70, 0x63, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x4d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x43,
|
||||
0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x6a,
|
||||
0x0a, 0x15, 0x58, 0x49, 0x6d, 0x70, 0x6f, 0x72, 0x74, 0x4d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e,
|
||||
0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x12, 0x27, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x72,
|
||||
0x72, 0x70, 0x63, 0x2e, 0x58, 0x49, 0x6d, 0x70, 0x6f, 0x72, 0x74, 0x4d, 0x69, 0x73, 0x73, 0x69,
|
||||
0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74,
|
||||
0x1a, 0x28, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x72, 0x72, 0x70, 0x63, 0x2e, 0x58, 0x49, 0x6d,
|
||||
0x70, 0x6f, 0x72, 0x74, 0x4d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x74, 0x72,
|
||||
0x6f, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x70, 0x0a, 0x17, 0x47, 0x65,
|
||||
0x46, 0x65, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x72, 0x6f, 0x75,
|
||||
0x74, 0x65, 0x72, 0x72, 0x70, 0x63, 0x2e, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x46, 0x65, 0x65, 0x52,
|
||||
0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x51, 0x0a, 0x0b, 0x53, 0x65, 0x6e, 0x64, 0x54,
|
||||
0x6f, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x12, 0x1d, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x72, 0x72,
|
||||
0x70, 0x63, 0x2e, 0x53, 0x65, 0x6e, 0x64, 0x54, 0x6f, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x52, 0x65,
|
||||
0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1e, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x72, 0x72, 0x70,
|
||||
0x63, 0x2e, 0x53, 0x65, 0x6e, 0x64, 0x54, 0x6f, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x52, 0x65, 0x73,
|
||||
0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x03, 0x88, 0x02, 0x01, 0x12, 0x42, 0x0a, 0x0d, 0x53, 0x65,
|
||||
0x6e, 0x64, 0x54, 0x6f, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x56, 0x32, 0x12, 0x1d, 0x2e, 0x72, 0x6f,
|
||||
0x75, 0x74, 0x65, 0x72, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x65, 0x6e, 0x64, 0x54, 0x6f, 0x52, 0x6f,
|
||||
0x75, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x12, 0x2e, 0x6c, 0x6e, 0x72,
|
||||
0x70, 0x63, 0x2e, 0x48, 0x54, 0x4c, 0x43, 0x41, 0x74, 0x74, 0x65, 0x6d, 0x70, 0x74, 0x12, 0x64,
|
||||
0x0a, 0x13, 0x52, 0x65, 0x73, 0x65, 0x74, 0x4d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x43, 0x6f,
|
||||
0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x12, 0x25, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x72, 0x72, 0x70,
|
||||
0x63, 0x2e, 0x52, 0x65, 0x73, 0x65, 0x74, 0x4d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x43, 0x6f,
|
||||
0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x26, 0x2e, 0x72,
|
||||
0x6f, 0x75, 0x74, 0x65, 0x72, 0x72, 0x70, 0x63, 0x2e, 0x52, 0x65, 0x73, 0x65, 0x74, 0x4d, 0x69,
|
||||
0x73, 0x73, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x52, 0x65, 0x73, 0x70,
|
||||
0x6f, 0x6e, 0x73, 0x65, 0x12, 0x64, 0x0a, 0x13, 0x51, 0x75, 0x65, 0x72, 0x79, 0x4d, 0x69, 0x73,
|
||||
0x73, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x12, 0x25, 0x2e, 0x72, 0x6f,
|
||||
0x75, 0x74, 0x65, 0x72, 0x72, 0x70, 0x63, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x4d, 0x69, 0x73,
|
||||
0x73, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65,
|
||||
0x73, 0x74, 0x1a, 0x26, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x72, 0x72, 0x70, 0x63, 0x2e, 0x51,
|
||||
0x75, 0x65, 0x72, 0x79, 0x4d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x74, 0x72,
|
||||
0x6f, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x6a, 0x0a, 0x15, 0x58, 0x49,
|
||||
0x6d, 0x70, 0x6f, 0x72, 0x74, 0x4d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x74,
|
||||
0x72, 0x6f, 0x6c, 0x12, 0x27, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x72, 0x72, 0x70, 0x63, 0x2e,
|
||||
0x58, 0x49, 0x6d, 0x70, 0x6f, 0x72, 0x74, 0x4d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x43, 0x6f,
|
||||
0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x28, 0x2e, 0x72,
|
||||
0x6f, 0x75, 0x74, 0x65, 0x72, 0x72, 0x70, 0x63, 0x2e, 0x58, 0x49, 0x6d, 0x70, 0x6f, 0x72, 0x74,
|
||||
0x4d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x52, 0x65,
|
||||
0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x70, 0x0a, 0x17, 0x47, 0x65, 0x74, 0x4d, 0x69, 0x73,
|
||||
0x73, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x43, 0x6f, 0x6e, 0x66, 0x69,
|
||||
0x67, 0x12, 0x29, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x72, 0x72, 0x70, 0x63, 0x2e, 0x47, 0x65,
|
||||
0x74, 0x4d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x43,
|
||||
0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x29, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x72, 0x72, 0x70,
|
||||
0x63, 0x2e, 0x47, 0x65, 0x74, 0x4d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x74,
|
||||
0x72, 0x6f, 0x6c, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74,
|
||||
0x1a, 0x2a, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x72, 0x72, 0x70, 0x63, 0x2e, 0x47, 0x65, 0x74,
|
||||
0x4d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x43, 0x6f,
|
||||
0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x70, 0x0a, 0x17,
|
||||
0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2a, 0x2e, 0x72,
|
||||
0x6f, 0x75, 0x74, 0x65, 0x72, 0x72, 0x70, 0x63, 0x2e, 0x47, 0x65, 0x74, 0x4d, 0x69, 0x73, 0x73,
|
||||
0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67,
|
||||
0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x70, 0x0a, 0x17, 0x53, 0x65, 0x74, 0x4d,
|
||||
0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x43, 0x6f, 0x6e,
|
||||
0x66, 0x69, 0x67, 0x12, 0x29, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x72, 0x72, 0x70, 0x63, 0x2e,
|
||||
0x53, 0x65, 0x74, 0x4d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f,
|
||||
0x6c, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x29, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x72,
|
||||
0x72, 0x70, 0x63, 0x2e, 0x53, 0x65, 0x74, 0x4d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x43, 0x6f,
|
||||
0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65,
|
||||
0x73, 0x74, 0x1a, 0x2a, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x72, 0x72, 0x70, 0x63, 0x2e, 0x53,
|
||||
0x65, 0x74, 0x4d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c,
|
||||
0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x5b,
|
||||
0x0a, 0x10, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x72, 0x6f, 0x62, 0x61, 0x62, 0x69, 0x6c, 0x69,
|
||||
0x74, 0x79, 0x12, 0x22, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x72, 0x72, 0x70, 0x63, 0x2e, 0x51,
|
||||
0x6c, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2a,
|
||||
0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x72, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x65, 0x74, 0x4d, 0x69,
|
||||
0x73, 0x73, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x43, 0x6f, 0x6e, 0x66,
|
||||
0x69, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x5b, 0x0a, 0x10, 0x51, 0x75,
|
||||
0x65, 0x72, 0x79, 0x50, 0x72, 0x6f, 0x62, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x12, 0x22,
|
||||
0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x72, 0x72, 0x70, 0x63, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79,
|
||||
0x50, 0x72, 0x6f, 0x62, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65,
|
||||
0x73, 0x74, 0x1a, 0x23, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x72, 0x72, 0x70, 0x63, 0x2e, 0x51,
|
||||
0x75, 0x65, 0x72, 0x79, 0x50, 0x72, 0x6f, 0x62, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x52,
|
||||
0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x23, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x72, 0x72,
|
||||
0x70, 0x63, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x72, 0x6f, 0x62, 0x61, 0x62, 0x69, 0x6c,
|
||||
0x69, 0x74, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x49, 0x0a, 0x0a, 0x42,
|
||||
0x75, 0x69, 0x6c, 0x64, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x12, 0x1c, 0x2e, 0x72, 0x6f, 0x75, 0x74,
|
||||
0x65, 0x72, 0x72, 0x70, 0x63, 0x2e, 0x42, 0x75, 0x69, 0x6c, 0x64, 0x52, 0x6f, 0x75, 0x74, 0x65,
|
||||
0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x72,
|
||||
0x72, 0x70, 0x63, 0x2e, 0x42, 0x75, 0x69, 0x6c, 0x64, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x52, 0x65,
|
||||
0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x54, 0x0a, 0x13, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72,
|
||||
0x69, 0x62, 0x65, 0x48, 0x74, 0x6c, 0x63, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x12, 0x25, 0x2e,
|
||||
0x72, 0x6f, 0x75, 0x74, 0x65, 0x72, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72,
|
||||
0x69, 0x62, 0x65, 0x48, 0x74, 0x6c, 0x63, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x71,
|
||||
0x75, 0x65, 0x73, 0x74, 0x1a, 0x14, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x72, 0x72, 0x70, 0x63,
|
||||
0x2e, 0x48, 0x74, 0x6c, 0x63, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x30, 0x01, 0x12, 0x4d, 0x0a, 0x0b,
|
||||
0x53, 0x65, 0x6e, 0x64, 0x50, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x1d, 0x2e, 0x72, 0x6f,
|
||||
0x75, 0x74, 0x65, 0x72, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x65, 0x6e, 0x64, 0x50, 0x61, 0x79, 0x6d,
|
||||
0x65, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x18, 0x2e, 0x72, 0x6f, 0x75,
|
||||
0x74, 0x65, 0x72, 0x72, 0x70, 0x63, 0x2e, 0x50, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x53, 0x74,
|
||||
0x61, 0x74, 0x75, 0x73, 0x22, 0x03, 0x88, 0x02, 0x01, 0x30, 0x01, 0x12, 0x4f, 0x0a, 0x0c, 0x54,
|
||||
0x72, 0x61, 0x63, 0x6b, 0x50, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x1e, 0x2e, 0x72, 0x6f,
|
||||
0x75, 0x74, 0x65, 0x72, 0x72, 0x70, 0x63, 0x2e, 0x54, 0x72, 0x61, 0x63, 0x6b, 0x50, 0x61, 0x79,
|
||||
0x6d, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x18, 0x2e, 0x72, 0x6f,
|
||||
0x75, 0x74, 0x65, 0x72, 0x72, 0x70, 0x63, 0x2e, 0x50, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x53,
|
||||
0x74, 0x61, 0x74, 0x75, 0x73, 0x22, 0x03, 0x88, 0x02, 0x01, 0x30, 0x01, 0x12, 0x66, 0x0a, 0x0f,
|
||||
0x48, 0x74, 0x6c, 0x63, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x63, 0x65, 0x70, 0x74, 0x6f, 0x72, 0x12,
|
||||
0x27, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x72, 0x72, 0x70, 0x63, 0x2e, 0x46, 0x6f, 0x72, 0x77,
|
||||
0x61, 0x72, 0x64, 0x48, 0x74, 0x6c, 0x63, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x63, 0x65, 0x70, 0x74,
|
||||
0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x1a, 0x26, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65,
|
||||
0x72, 0x72, 0x70, 0x63, 0x2e, 0x46, 0x6f, 0x72, 0x77, 0x61, 0x72, 0x64, 0x48, 0x74, 0x6c, 0x63,
|
||||
0x49, 0x6e, 0x74, 0x65, 0x72, 0x63, 0x65, 0x70, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74,
|
||||
0x28, 0x01, 0x30, 0x01, 0x12, 0x5b, 0x0a, 0x10, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x43, 0x68,
|
||||
0x61, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x22, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65,
|
||||
0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x49, 0x0a, 0x0a, 0x42, 0x75, 0x69, 0x6c, 0x64,
|
||||
0x52, 0x6f, 0x75, 0x74, 0x65, 0x12, 0x1c, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x72, 0x72, 0x70,
|
||||
0x63, 0x2e, 0x42, 0x75, 0x69, 0x6c, 0x64, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75,
|
||||
0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x72, 0x72, 0x70, 0x63, 0x2e,
|
||||
0x42, 0x75, 0x69, 0x6c, 0x64, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e,
|
||||
0x73, 0x65, 0x12, 0x54, 0x0a, 0x13, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x48,
|
||||
0x74, 0x6c, 0x63, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x12, 0x25, 0x2e, 0x72, 0x6f, 0x75, 0x74,
|
||||
0x65, 0x72, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x48,
|
||||
0x74, 0x6c, 0x63, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74,
|
||||
0x1a, 0x14, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x72, 0x72, 0x70, 0x63, 0x2e, 0x48, 0x74, 0x6c,
|
||||
0x63, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x30, 0x01, 0x12, 0x4d, 0x0a, 0x0b, 0x53, 0x65, 0x6e, 0x64,
|
||||
0x50, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x1d, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x72,
|
||||
0x72, 0x70, 0x63, 0x2e, 0x53, 0x65, 0x6e, 0x64, 0x50, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x52,
|
||||
0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x18, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x72, 0x72,
|
||||
0x70, 0x63, 0x2e, 0x50, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73,
|
||||
0x22, 0x03, 0x88, 0x02, 0x01, 0x30, 0x01, 0x12, 0x4f, 0x0a, 0x0c, 0x54, 0x72, 0x61, 0x63, 0x6b,
|
||||
0x50, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x1e, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x72,
|
||||
0x72, 0x70, 0x63, 0x2e, 0x54, 0x72, 0x61, 0x63, 0x6b, 0x50, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74,
|
||||
0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x18, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x72,
|
||||
0x72, 0x70, 0x63, 0x2e, 0x50, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x53, 0x74, 0x61, 0x74, 0x75,
|
||||
0x73, 0x22, 0x03, 0x88, 0x02, 0x01, 0x30, 0x01, 0x12, 0x66, 0x0a, 0x0f, 0x48, 0x74, 0x6c, 0x63,
|
||||
0x49, 0x6e, 0x74, 0x65, 0x72, 0x63, 0x65, 0x70, 0x74, 0x6f, 0x72, 0x12, 0x27, 0x2e, 0x72, 0x6f,
|
||||
0x75, 0x74, 0x65, 0x72, 0x72, 0x70, 0x63, 0x2e, 0x46, 0x6f, 0x72, 0x77, 0x61, 0x72, 0x64, 0x48,
|
||||
0x74, 0x6c, 0x63, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x63, 0x65, 0x70, 0x74, 0x52, 0x65, 0x73, 0x70,
|
||||
0x6f, 0x6e, 0x73, 0x65, 0x1a, 0x26, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x72, 0x72, 0x70, 0x63,
|
||||
0x2e, 0x46, 0x6f, 0x72, 0x77, 0x61, 0x72, 0x64, 0x48, 0x74, 0x6c, 0x63, 0x49, 0x6e, 0x74, 0x65,
|
||||
0x72, 0x63, 0x65, 0x70, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x28, 0x01, 0x30, 0x01,
|
||||
0x12, 0x5b, 0x0a, 0x10, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x43, 0x68, 0x61, 0x6e, 0x53, 0x74,
|
||||
0x61, 0x74, 0x75, 0x73, 0x12, 0x22, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x72, 0x72, 0x70, 0x63,
|
||||
0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x43, 0x68, 0x61, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x75,
|
||||
0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x23, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65,
|
||||
0x72, 0x72, 0x70, 0x63, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x43, 0x68, 0x61, 0x6e, 0x53,
|
||||
0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x23, 0x2e, 0x72,
|
||||
0x6f, 0x75, 0x74, 0x65, 0x72, 0x72, 0x70, 0x63, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x43,
|
||||
0x68, 0x61, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73,
|
||||
0x65, 0x42, 0x31, 0x5a, 0x2f, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f,
|
||||
0x6c, 0x69, 0x67, 0x68, 0x74, 0x6e, 0x69, 0x6e, 0x67, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b,
|
||||
0x2f, 0x6c, 0x6e, 0x64, 0x2f, 0x6c, 0x6e, 0x72, 0x70, 0x63, 0x2f, 0x72, 0x6f, 0x75, 0x74, 0x65,
|
||||
0x72, 0x72, 0x70, 0x63, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||
0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x53, 0x0a,
|
||||
0x14, 0x58, 0x41, 0x64, 0x64, 0x4c, 0x6f, 0x63, 0x61, 0x6c, 0x43, 0x68, 0x61, 0x6e, 0x41, 0x6c,
|
||||
0x69, 0x61, 0x73, 0x65, 0x73, 0x12, 0x1c, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x72, 0x72, 0x70,
|
||||
0x63, 0x2e, 0x41, 0x64, 0x64, 0x41, 0x6c, 0x69, 0x61, 0x73, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75,
|
||||
0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x72, 0x72, 0x70, 0x63, 0x2e,
|
||||
0x41, 0x64, 0x64, 0x41, 0x6c, 0x69, 0x61, 0x73, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e,
|
||||
0x73, 0x65, 0x12, 0x5c, 0x0a, 0x17, 0x58, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x4c, 0x6f, 0x63,
|
||||
0x61, 0x6c, 0x43, 0x68, 0x61, 0x6e, 0x41, 0x6c, 0x69, 0x61, 0x73, 0x65, 0x73, 0x12, 0x1f, 0x2e,
|
||||
0x72, 0x6f, 0x75, 0x74, 0x65, 0x72, 0x72, 0x70, 0x63, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65,
|
||||
0x41, 0x6c, 0x69, 0x61, 0x73, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x20,
|
||||
0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x72, 0x72, 0x70, 0x63, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74,
|
||||
0x65, 0x41, 0x6c, 0x69, 0x61, 0x73, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65,
|
||||
0x42, 0x31, 0x5a, 0x2f, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6c,
|
||||
0x69, 0x67, 0x68, 0x74, 0x6e, 0x69, 0x6e, 0x67, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2f,
|
||||
0x6c, 0x6e, 0x64, 0x2f, 0x6c, 0x6e, 0x72, 0x70, 0x63, 0x2f, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x72,
|
||||
0x72, 0x70, 0x63, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||
}
|
||||
|
||||
var (
|
||||
@ -3980,7 +4197,7 @@ func file_routerrpc_router_proto_rawDescGZIP() []byte {
|
||||
}
|
||||
|
||||
var file_routerrpc_router_proto_enumTypes = make([]protoimpl.EnumInfo, 6)
|
||||
var file_routerrpc_router_proto_msgTypes = make([]protoimpl.MessageInfo, 44)
|
||||
var file_routerrpc_router_proto_msgTypes = make([]protoimpl.MessageInfo, 48)
|
||||
var file_routerrpc_router_proto_goTypes = []interface{}{
|
||||
(FailureDetail)(0), // 0: routerrpc.FailureDetail
|
||||
(PaymentState)(0), // 1: routerrpc.PaymentState
|
||||
@ -4029,26 +4246,31 @@ var file_routerrpc_router_proto_goTypes = []interface{}{
|
||||
(*ForwardHtlcInterceptResponse)(nil), // 44: routerrpc.ForwardHtlcInterceptResponse
|
||||
(*UpdateChanStatusRequest)(nil), // 45: routerrpc.UpdateChanStatusRequest
|
||||
(*UpdateChanStatusResponse)(nil), // 46: routerrpc.UpdateChanStatusResponse
|
||||
nil, // 47: routerrpc.SendPaymentRequest.DestCustomRecordsEntry
|
||||
nil, // 48: routerrpc.ForwardHtlcInterceptRequest.CustomRecordsEntry
|
||||
nil, // 49: routerrpc.ForwardHtlcInterceptResponse.CustomRecordsEntry
|
||||
(*lnrpc.RouteHint)(nil), // 50: lnrpc.RouteHint
|
||||
(lnrpc.FeatureBit)(0), // 51: lnrpc.FeatureBit
|
||||
(lnrpc.PaymentFailureReason)(0), // 52: lnrpc.PaymentFailureReason
|
||||
(*lnrpc.Route)(nil), // 53: lnrpc.Route
|
||||
(*lnrpc.Failure)(nil), // 54: lnrpc.Failure
|
||||
(lnrpc.Failure_FailureCode)(0), // 55: lnrpc.Failure.FailureCode
|
||||
(*lnrpc.HTLCAttempt)(nil), // 56: lnrpc.HTLCAttempt
|
||||
(*lnrpc.ChannelPoint)(nil), // 57: lnrpc.ChannelPoint
|
||||
(*lnrpc.Payment)(nil), // 58: lnrpc.Payment
|
||||
(*AddAliasesRequest)(nil), // 47: routerrpc.AddAliasesRequest
|
||||
(*AddAliasesResponse)(nil), // 48: routerrpc.AddAliasesResponse
|
||||
(*DeleteAliasesRequest)(nil), // 49: routerrpc.DeleteAliasesRequest
|
||||
(*DeleteAliasesResponse)(nil), // 50: routerrpc.DeleteAliasesResponse
|
||||
nil, // 51: routerrpc.SendPaymentRequest.DestCustomRecordsEntry
|
||||
nil, // 52: routerrpc.ForwardHtlcInterceptRequest.CustomRecordsEntry
|
||||
nil, // 53: routerrpc.ForwardHtlcInterceptResponse.CustomRecordsEntry
|
||||
(*lnrpc.RouteHint)(nil), // 54: lnrpc.RouteHint
|
||||
(lnrpc.FeatureBit)(0), // 55: lnrpc.FeatureBit
|
||||
(lnrpc.PaymentFailureReason)(0), // 56: lnrpc.PaymentFailureReason
|
||||
(*lnrpc.Route)(nil), // 57: lnrpc.Route
|
||||
(*lnrpc.Failure)(nil), // 58: lnrpc.Failure
|
||||
(lnrpc.Failure_FailureCode)(0), // 59: lnrpc.Failure.FailureCode
|
||||
(*lnrpc.HTLCAttempt)(nil), // 60: lnrpc.HTLCAttempt
|
||||
(*lnrpc.ChannelPoint)(nil), // 61: lnrpc.ChannelPoint
|
||||
(*lnrpc.AliasMap)(nil), // 62: lnrpc.AliasMap
|
||||
(*lnrpc.Payment)(nil), // 63: lnrpc.Payment
|
||||
}
|
||||
var file_routerrpc_router_proto_depIdxs = []int32{
|
||||
50, // 0: routerrpc.SendPaymentRequest.route_hints:type_name -> lnrpc.RouteHint
|
||||
47, // 1: routerrpc.SendPaymentRequest.dest_custom_records:type_name -> routerrpc.SendPaymentRequest.DestCustomRecordsEntry
|
||||
51, // 2: routerrpc.SendPaymentRequest.dest_features:type_name -> lnrpc.FeatureBit
|
||||
52, // 3: routerrpc.RouteFeeResponse.failure_reason:type_name -> lnrpc.PaymentFailureReason
|
||||
53, // 4: routerrpc.SendToRouteRequest.route:type_name -> lnrpc.Route
|
||||
54, // 5: routerrpc.SendToRouteResponse.failure:type_name -> lnrpc.Failure
|
||||
54, // 0: routerrpc.SendPaymentRequest.route_hints:type_name -> lnrpc.RouteHint
|
||||
51, // 1: routerrpc.SendPaymentRequest.dest_custom_records:type_name -> routerrpc.SendPaymentRequest.DestCustomRecordsEntry
|
||||
55, // 2: routerrpc.SendPaymentRequest.dest_features:type_name -> lnrpc.FeatureBit
|
||||
56, // 3: routerrpc.RouteFeeResponse.failure_reason:type_name -> lnrpc.PaymentFailureReason
|
||||
57, // 4: routerrpc.SendToRouteRequest.route:type_name -> lnrpc.Route
|
||||
58, // 5: routerrpc.SendToRouteResponse.failure:type_name -> lnrpc.Failure
|
||||
19, // 6: routerrpc.QueryMissionControlResponse.pairs:type_name -> routerrpc.PairHistory
|
||||
19, // 7: routerrpc.XImportMissionControlRequest.pairs:type_name -> routerrpc.PairHistory
|
||||
20, // 8: routerrpc.PairHistory.history:type_name -> routerrpc.PairData
|
||||
@ -4058,7 +4280,7 @@ var file_routerrpc_router_proto_depIdxs = []int32{
|
||||
27, // 12: routerrpc.MissionControlConfig.apriori:type_name -> routerrpc.AprioriParameters
|
||||
26, // 13: routerrpc.MissionControlConfig.bimodal:type_name -> routerrpc.BimodalParameters
|
||||
20, // 14: routerrpc.QueryProbabilityResponse.history:type_name -> routerrpc.PairData
|
||||
53, // 15: routerrpc.BuildRouteResponse.route:type_name -> lnrpc.Route
|
||||
57, // 15: routerrpc.BuildRouteResponse.route:type_name -> lnrpc.Route
|
||||
5, // 16: routerrpc.HtlcEvent.event_type:type_name -> routerrpc.HtlcEvent.EventType
|
||||
35, // 17: routerrpc.HtlcEvent.forward_event:type_name -> routerrpc.ForwardEvent
|
||||
36, // 18: routerrpc.HtlcEvent.forward_fail_event:type_name -> routerrpc.ForwardFailEvent
|
||||
@ -4068,59 +4290,67 @@ var file_routerrpc_router_proto_depIdxs = []int32{
|
||||
38, // 22: routerrpc.HtlcEvent.final_htlc_event:type_name -> routerrpc.FinalHtlcEvent
|
||||
34, // 23: routerrpc.ForwardEvent.info:type_name -> routerrpc.HtlcInfo
|
||||
34, // 24: routerrpc.LinkFailEvent.info:type_name -> routerrpc.HtlcInfo
|
||||
55, // 25: routerrpc.LinkFailEvent.wire_failure:type_name -> lnrpc.Failure.FailureCode
|
||||
59, // 25: routerrpc.LinkFailEvent.wire_failure:type_name -> lnrpc.Failure.FailureCode
|
||||
0, // 26: routerrpc.LinkFailEvent.failure_detail:type_name -> routerrpc.FailureDetail
|
||||
1, // 27: routerrpc.PaymentStatus.state:type_name -> routerrpc.PaymentState
|
||||
56, // 28: routerrpc.PaymentStatus.htlcs:type_name -> lnrpc.HTLCAttempt
|
||||
60, // 28: routerrpc.PaymentStatus.htlcs:type_name -> lnrpc.HTLCAttempt
|
||||
42, // 29: routerrpc.ForwardHtlcInterceptRequest.incoming_circuit_key:type_name -> routerrpc.CircuitKey
|
||||
48, // 30: routerrpc.ForwardHtlcInterceptRequest.custom_records:type_name -> routerrpc.ForwardHtlcInterceptRequest.CustomRecordsEntry
|
||||
52, // 30: routerrpc.ForwardHtlcInterceptRequest.custom_records:type_name -> routerrpc.ForwardHtlcInterceptRequest.CustomRecordsEntry
|
||||
42, // 31: routerrpc.ForwardHtlcInterceptResponse.incoming_circuit_key:type_name -> routerrpc.CircuitKey
|
||||
2, // 32: routerrpc.ForwardHtlcInterceptResponse.action:type_name -> routerrpc.ResolveHoldForwardAction
|
||||
55, // 33: routerrpc.ForwardHtlcInterceptResponse.failure_code:type_name -> lnrpc.Failure.FailureCode
|
||||
49, // 34: routerrpc.ForwardHtlcInterceptResponse.custom_records:type_name -> routerrpc.ForwardHtlcInterceptResponse.CustomRecordsEntry
|
||||
57, // 35: routerrpc.UpdateChanStatusRequest.chan_point:type_name -> lnrpc.ChannelPoint
|
||||
59, // 33: routerrpc.ForwardHtlcInterceptResponse.failure_code:type_name -> lnrpc.Failure.FailureCode
|
||||
53, // 34: routerrpc.ForwardHtlcInterceptResponse.custom_records:type_name -> routerrpc.ForwardHtlcInterceptResponse.CustomRecordsEntry
|
||||
61, // 35: routerrpc.UpdateChanStatusRequest.chan_point:type_name -> lnrpc.ChannelPoint
|
||||
3, // 36: routerrpc.UpdateChanStatusRequest.action:type_name -> routerrpc.ChanStatusAction
|
||||
6, // 37: routerrpc.Router.SendPaymentV2:input_type -> routerrpc.SendPaymentRequest
|
||||
7, // 38: routerrpc.Router.TrackPaymentV2:input_type -> routerrpc.TrackPaymentRequest
|
||||
8, // 39: routerrpc.Router.TrackPayments:input_type -> routerrpc.TrackPaymentsRequest
|
||||
9, // 40: routerrpc.Router.EstimateRouteFee:input_type -> routerrpc.RouteFeeRequest
|
||||
11, // 41: routerrpc.Router.SendToRoute:input_type -> routerrpc.SendToRouteRequest
|
||||
11, // 42: routerrpc.Router.SendToRouteV2:input_type -> routerrpc.SendToRouteRequest
|
||||
13, // 43: routerrpc.Router.ResetMissionControl:input_type -> routerrpc.ResetMissionControlRequest
|
||||
15, // 44: routerrpc.Router.QueryMissionControl:input_type -> routerrpc.QueryMissionControlRequest
|
||||
17, // 45: routerrpc.Router.XImportMissionControl:input_type -> routerrpc.XImportMissionControlRequest
|
||||
21, // 46: routerrpc.Router.GetMissionControlConfig:input_type -> routerrpc.GetMissionControlConfigRequest
|
||||
23, // 47: routerrpc.Router.SetMissionControlConfig:input_type -> routerrpc.SetMissionControlConfigRequest
|
||||
28, // 48: routerrpc.Router.QueryProbability:input_type -> routerrpc.QueryProbabilityRequest
|
||||
30, // 49: routerrpc.Router.BuildRoute:input_type -> routerrpc.BuildRouteRequest
|
||||
32, // 50: routerrpc.Router.SubscribeHtlcEvents:input_type -> routerrpc.SubscribeHtlcEventsRequest
|
||||
6, // 51: routerrpc.Router.SendPayment:input_type -> routerrpc.SendPaymentRequest
|
||||
7, // 52: routerrpc.Router.TrackPayment:input_type -> routerrpc.TrackPaymentRequest
|
||||
44, // 53: routerrpc.Router.HtlcInterceptor:input_type -> routerrpc.ForwardHtlcInterceptResponse
|
||||
45, // 54: routerrpc.Router.UpdateChanStatus:input_type -> routerrpc.UpdateChanStatusRequest
|
||||
58, // 55: routerrpc.Router.SendPaymentV2:output_type -> lnrpc.Payment
|
||||
58, // 56: routerrpc.Router.TrackPaymentV2:output_type -> lnrpc.Payment
|
||||
58, // 57: routerrpc.Router.TrackPayments:output_type -> lnrpc.Payment
|
||||
10, // 58: routerrpc.Router.EstimateRouteFee:output_type -> routerrpc.RouteFeeResponse
|
||||
12, // 59: routerrpc.Router.SendToRoute:output_type -> routerrpc.SendToRouteResponse
|
||||
56, // 60: routerrpc.Router.SendToRouteV2:output_type -> lnrpc.HTLCAttempt
|
||||
14, // 61: routerrpc.Router.ResetMissionControl:output_type -> routerrpc.ResetMissionControlResponse
|
||||
16, // 62: routerrpc.Router.QueryMissionControl:output_type -> routerrpc.QueryMissionControlResponse
|
||||
18, // 63: routerrpc.Router.XImportMissionControl:output_type -> routerrpc.XImportMissionControlResponse
|
||||
22, // 64: routerrpc.Router.GetMissionControlConfig:output_type -> routerrpc.GetMissionControlConfigResponse
|
||||
24, // 65: routerrpc.Router.SetMissionControlConfig:output_type -> routerrpc.SetMissionControlConfigResponse
|
||||
29, // 66: routerrpc.Router.QueryProbability:output_type -> routerrpc.QueryProbabilityResponse
|
||||
31, // 67: routerrpc.Router.BuildRoute:output_type -> routerrpc.BuildRouteResponse
|
||||
33, // 68: routerrpc.Router.SubscribeHtlcEvents:output_type -> routerrpc.HtlcEvent
|
||||
41, // 69: routerrpc.Router.SendPayment:output_type -> routerrpc.PaymentStatus
|
||||
41, // 70: routerrpc.Router.TrackPayment:output_type -> routerrpc.PaymentStatus
|
||||
43, // 71: routerrpc.Router.HtlcInterceptor:output_type -> routerrpc.ForwardHtlcInterceptRequest
|
||||
46, // 72: routerrpc.Router.UpdateChanStatus:output_type -> routerrpc.UpdateChanStatusResponse
|
||||
55, // [55:73] is the sub-list for method output_type
|
||||
37, // [37:55] is the sub-list for method input_type
|
||||
37, // [37:37] is the sub-list for extension type_name
|
||||
37, // [37:37] is the sub-list for extension extendee
|
||||
0, // [0:37] is the sub-list for field type_name
|
||||
62, // 37: routerrpc.AddAliasesRequest.alias_maps:type_name -> lnrpc.AliasMap
|
||||
62, // 38: routerrpc.AddAliasesResponse.alias_maps:type_name -> lnrpc.AliasMap
|
||||
62, // 39: routerrpc.DeleteAliasesRequest.alias_maps:type_name -> lnrpc.AliasMap
|
||||
62, // 40: routerrpc.DeleteAliasesResponse.alias_maps:type_name -> lnrpc.AliasMap
|
||||
6, // 41: routerrpc.Router.SendPaymentV2:input_type -> routerrpc.SendPaymentRequest
|
||||
7, // 42: routerrpc.Router.TrackPaymentV2:input_type -> routerrpc.TrackPaymentRequest
|
||||
8, // 43: routerrpc.Router.TrackPayments:input_type -> routerrpc.TrackPaymentsRequest
|
||||
9, // 44: routerrpc.Router.EstimateRouteFee:input_type -> routerrpc.RouteFeeRequest
|
||||
11, // 45: routerrpc.Router.SendToRoute:input_type -> routerrpc.SendToRouteRequest
|
||||
11, // 46: routerrpc.Router.SendToRouteV2:input_type -> routerrpc.SendToRouteRequest
|
||||
13, // 47: routerrpc.Router.ResetMissionControl:input_type -> routerrpc.ResetMissionControlRequest
|
||||
15, // 48: routerrpc.Router.QueryMissionControl:input_type -> routerrpc.QueryMissionControlRequest
|
||||
17, // 49: routerrpc.Router.XImportMissionControl:input_type -> routerrpc.XImportMissionControlRequest
|
||||
21, // 50: routerrpc.Router.GetMissionControlConfig:input_type -> routerrpc.GetMissionControlConfigRequest
|
||||
23, // 51: routerrpc.Router.SetMissionControlConfig:input_type -> routerrpc.SetMissionControlConfigRequest
|
||||
28, // 52: routerrpc.Router.QueryProbability:input_type -> routerrpc.QueryProbabilityRequest
|
||||
30, // 53: routerrpc.Router.BuildRoute:input_type -> routerrpc.BuildRouteRequest
|
||||
32, // 54: routerrpc.Router.SubscribeHtlcEvents:input_type -> routerrpc.SubscribeHtlcEventsRequest
|
||||
6, // 55: routerrpc.Router.SendPayment:input_type -> routerrpc.SendPaymentRequest
|
||||
7, // 56: routerrpc.Router.TrackPayment:input_type -> routerrpc.TrackPaymentRequest
|
||||
44, // 57: routerrpc.Router.HtlcInterceptor:input_type -> routerrpc.ForwardHtlcInterceptResponse
|
||||
45, // 58: routerrpc.Router.UpdateChanStatus:input_type -> routerrpc.UpdateChanStatusRequest
|
||||
47, // 59: routerrpc.Router.XAddLocalChanAliases:input_type -> routerrpc.AddAliasesRequest
|
||||
49, // 60: routerrpc.Router.XDeleteLocalChanAliases:input_type -> routerrpc.DeleteAliasesRequest
|
||||
63, // 61: routerrpc.Router.SendPaymentV2:output_type -> lnrpc.Payment
|
||||
63, // 62: routerrpc.Router.TrackPaymentV2:output_type -> lnrpc.Payment
|
||||
63, // 63: routerrpc.Router.TrackPayments:output_type -> lnrpc.Payment
|
||||
10, // 64: routerrpc.Router.EstimateRouteFee:output_type -> routerrpc.RouteFeeResponse
|
||||
12, // 65: routerrpc.Router.SendToRoute:output_type -> routerrpc.SendToRouteResponse
|
||||
60, // 66: routerrpc.Router.SendToRouteV2:output_type -> lnrpc.HTLCAttempt
|
||||
14, // 67: routerrpc.Router.ResetMissionControl:output_type -> routerrpc.ResetMissionControlResponse
|
||||
16, // 68: routerrpc.Router.QueryMissionControl:output_type -> routerrpc.QueryMissionControlResponse
|
||||
18, // 69: routerrpc.Router.XImportMissionControl:output_type -> routerrpc.XImportMissionControlResponse
|
||||
22, // 70: routerrpc.Router.GetMissionControlConfig:output_type -> routerrpc.GetMissionControlConfigResponse
|
||||
24, // 71: routerrpc.Router.SetMissionControlConfig:output_type -> routerrpc.SetMissionControlConfigResponse
|
||||
29, // 72: routerrpc.Router.QueryProbability:output_type -> routerrpc.QueryProbabilityResponse
|
||||
31, // 73: routerrpc.Router.BuildRoute:output_type -> routerrpc.BuildRouteResponse
|
||||
33, // 74: routerrpc.Router.SubscribeHtlcEvents:output_type -> routerrpc.HtlcEvent
|
||||
41, // 75: routerrpc.Router.SendPayment:output_type -> routerrpc.PaymentStatus
|
||||
41, // 76: routerrpc.Router.TrackPayment:output_type -> routerrpc.PaymentStatus
|
||||
43, // 77: routerrpc.Router.HtlcInterceptor:output_type -> routerrpc.ForwardHtlcInterceptRequest
|
||||
46, // 78: routerrpc.Router.UpdateChanStatus:output_type -> routerrpc.UpdateChanStatusResponse
|
||||
48, // 79: routerrpc.Router.XAddLocalChanAliases:output_type -> routerrpc.AddAliasesResponse
|
||||
50, // 80: routerrpc.Router.XDeleteLocalChanAliases:output_type -> routerrpc.DeleteAliasesResponse
|
||||
61, // [61:81] is the sub-list for method output_type
|
||||
41, // [41:61] is the sub-list for method input_type
|
||||
41, // [41:41] is the sub-list for extension type_name
|
||||
41, // [41:41] is the sub-list for extension extendee
|
||||
0, // [0:41] is the sub-list for field type_name
|
||||
}
|
||||
|
||||
func init() { file_routerrpc_router_proto_init() }
|
||||
@ -4621,6 +4851,54 @@ func file_routerrpc_router_proto_init() {
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_routerrpc_router_proto_msgTypes[41].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*AddAliasesRequest); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_routerrpc_router_proto_msgTypes[42].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*AddAliasesResponse); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_routerrpc_router_proto_msgTypes[43].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*DeleteAliasesRequest); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_routerrpc_router_proto_msgTypes[44].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*DeleteAliasesResponse); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
}
|
||||
file_routerrpc_router_proto_msgTypes[19].OneofWrappers = []interface{}{
|
||||
(*MissionControlConfig_Apriori)(nil),
|
||||
@ -4640,7 +4918,7 @@ func file_routerrpc_router_proto_init() {
|
||||
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
||||
RawDescriptor: file_routerrpc_router_proto_rawDesc,
|
||||
NumEnums: 6,
|
||||
NumMessages: 44,
|
||||
NumMessages: 48,
|
||||
NumExtensions: 0,
|
||||
NumServices: 1,
|
||||
},
|
||||
|
@ -564,6 +564,74 @@ func local_request_Router_UpdateChanStatus_0(ctx context.Context, marshaler runt
|
||||
|
||||
}
|
||||
|
||||
func request_Router_XAddLocalChanAliases_0(ctx context.Context, marshaler runtime.Marshaler, client RouterClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
||||
var protoReq AddAliasesRequest
|
||||
var metadata runtime.ServerMetadata
|
||||
|
||||
newReader, berr := utilities.IOReaderFactory(req.Body)
|
||||
if berr != nil {
|
||||
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr)
|
||||
}
|
||||
if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF {
|
||||
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
|
||||
}
|
||||
|
||||
msg, err := client.XAddLocalChanAliases(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
|
||||
return msg, metadata, err
|
||||
|
||||
}
|
||||
|
||||
func local_request_Router_XAddLocalChanAliases_0(ctx context.Context, marshaler runtime.Marshaler, server RouterServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
||||
var protoReq AddAliasesRequest
|
||||
var metadata runtime.ServerMetadata
|
||||
|
||||
newReader, berr := utilities.IOReaderFactory(req.Body)
|
||||
if berr != nil {
|
||||
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr)
|
||||
}
|
||||
if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF {
|
||||
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
|
||||
}
|
||||
|
||||
msg, err := server.XAddLocalChanAliases(ctx, &protoReq)
|
||||
return msg, metadata, err
|
||||
|
||||
}
|
||||
|
||||
func request_Router_XDeleteLocalChanAliases_0(ctx context.Context, marshaler runtime.Marshaler, client RouterClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
||||
var protoReq DeleteAliasesRequest
|
||||
var metadata runtime.ServerMetadata
|
||||
|
||||
newReader, berr := utilities.IOReaderFactory(req.Body)
|
||||
if berr != nil {
|
||||
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr)
|
||||
}
|
||||
if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF {
|
||||
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
|
||||
}
|
||||
|
||||
msg, err := client.XDeleteLocalChanAliases(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
|
||||
return msg, metadata, err
|
||||
|
||||
}
|
||||
|
||||
func local_request_Router_XDeleteLocalChanAliases_0(ctx context.Context, marshaler runtime.Marshaler, server RouterServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
||||
var protoReq DeleteAliasesRequest
|
||||
var metadata runtime.ServerMetadata
|
||||
|
||||
newReader, berr := utilities.IOReaderFactory(req.Body)
|
||||
if berr != nil {
|
||||
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr)
|
||||
}
|
||||
if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF {
|
||||
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
|
||||
}
|
||||
|
||||
msg, err := server.XDeleteLocalChanAliases(ctx, &protoReq)
|
||||
return msg, metadata, err
|
||||
|
||||
}
|
||||
|
||||
// RegisterRouterHandlerServer registers the http handlers for service Router to "mux".
|
||||
// UnaryRPC :call RouterServer directly.
|
||||
// StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906.
|
||||
@ -835,6 +903,52 @@ func RegisterRouterHandlerServer(ctx context.Context, mux *runtime.ServeMux, ser
|
||||
|
||||
})
|
||||
|
||||
mux.Handle("POST", pattern_Router_XAddLocalChanAliases_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
||||
ctx, cancel := context.WithCancel(req.Context())
|
||||
defer cancel()
|
||||
var stream runtime.ServerTransportStream
|
||||
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
|
||||
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||
rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/routerrpc.Router/XAddLocalChanAliases", runtime.WithHTTPPathPattern("/v2/router/x/addaliases"))
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
}
|
||||
resp, md, err := local_request_Router_XAddLocalChanAliases_0(rctx, inboundMarshaler, server, req, pathParams)
|
||||
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
|
||||
ctx = runtime.NewServerMetadataContext(ctx, md)
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
}
|
||||
|
||||
forward_Router_XAddLocalChanAliases_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
||||
|
||||
})
|
||||
|
||||
mux.Handle("POST", pattern_Router_XDeleteLocalChanAliases_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
||||
ctx, cancel := context.WithCancel(req.Context())
|
||||
defer cancel()
|
||||
var stream runtime.ServerTransportStream
|
||||
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
|
||||
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||
rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/routerrpc.Router/XDeleteLocalChanAliases", runtime.WithHTTPPathPattern("/v2/router/x/deletealiases"))
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
}
|
||||
resp, md, err := local_request_Router_XDeleteLocalChanAliases_0(rctx, inboundMarshaler, server, req, pathParams)
|
||||
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
|
||||
ctx = runtime.NewServerMetadataContext(ctx, md)
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
}
|
||||
|
||||
forward_Router_XDeleteLocalChanAliases_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
||||
|
||||
})
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
@ -1176,6 +1290,46 @@ func RegisterRouterHandlerClient(ctx context.Context, mux *runtime.ServeMux, cli
|
||||
|
||||
})
|
||||
|
||||
mux.Handle("POST", pattern_Router_XAddLocalChanAliases_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
||||
ctx, cancel := context.WithCancel(req.Context())
|
||||
defer cancel()
|
||||
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||
rctx, err := runtime.AnnotateContext(ctx, mux, req, "/routerrpc.Router/XAddLocalChanAliases", runtime.WithHTTPPathPattern("/v2/router/x/addaliases"))
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
}
|
||||
resp, md, err := request_Router_XAddLocalChanAliases_0(rctx, inboundMarshaler, client, req, pathParams)
|
||||
ctx = runtime.NewServerMetadataContext(ctx, md)
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
}
|
||||
|
||||
forward_Router_XAddLocalChanAliases_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
||||
|
||||
})
|
||||
|
||||
mux.Handle("POST", pattern_Router_XDeleteLocalChanAliases_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
||||
ctx, cancel := context.WithCancel(req.Context())
|
||||
defer cancel()
|
||||
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||
rctx, err := runtime.AnnotateContext(ctx, mux, req, "/routerrpc.Router/XDeleteLocalChanAliases", runtime.WithHTTPPathPattern("/v2/router/x/deletealiases"))
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
}
|
||||
resp, md, err := request_Router_XDeleteLocalChanAliases_0(rctx, inboundMarshaler, client, req, pathParams)
|
||||
ctx = runtime.NewServerMetadataContext(ctx, md)
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
}
|
||||
|
||||
forward_Router_XDeleteLocalChanAliases_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
||||
|
||||
})
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
@ -1209,6 +1363,10 @@ var (
|
||||
pattern_Router_HtlcInterceptor_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"v2", "router", "htlcinterceptor"}, ""))
|
||||
|
||||
pattern_Router_UpdateChanStatus_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"v2", "router", "updatechanstatus"}, ""))
|
||||
|
||||
pattern_Router_XAddLocalChanAliases_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"v2", "router", "x", "addaliases"}, ""))
|
||||
|
||||
pattern_Router_XDeleteLocalChanAliases_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"v2", "router", "x", "deletealiases"}, ""))
|
||||
)
|
||||
|
||||
var (
|
||||
@ -1241,4 +1399,8 @@ var (
|
||||
forward_Router_HtlcInterceptor_0 = runtime.ForwardResponseStream
|
||||
|
||||
forward_Router_UpdateChanStatus_0 = runtime.ForwardResponseMessage
|
||||
|
||||
forward_Router_XAddLocalChanAliases_0 = runtime.ForwardResponseMessage
|
||||
|
||||
forward_Router_XDeleteLocalChanAliases_0 = runtime.ForwardResponseMessage
|
||||
)
|
||||
|
@ -547,4 +547,54 @@ func RegisterRouterJSONCallbacks(registry map[string]func(ctx context.Context,
|
||||
}
|
||||
callback(string(respBytes), nil)
|
||||
}
|
||||
|
||||
registry["routerrpc.Router.XAddLocalChanAliases"] = func(ctx context.Context,
|
||||
conn *grpc.ClientConn, reqJSON string, callback func(string, error)) {
|
||||
|
||||
req := &AddAliasesRequest{}
|
||||
err := marshaler.Unmarshal([]byte(reqJSON), req)
|
||||
if err != nil {
|
||||
callback("", err)
|
||||
return
|
||||
}
|
||||
|
||||
client := NewRouterClient(conn)
|
||||
resp, err := client.XAddLocalChanAliases(ctx, req)
|
||||
if err != nil {
|
||||
callback("", err)
|
||||
return
|
||||
}
|
||||
|
||||
respBytes, err := marshaler.Marshal(resp)
|
||||
if err != nil {
|
||||
callback("", err)
|
||||
return
|
||||
}
|
||||
callback(string(respBytes), nil)
|
||||
}
|
||||
|
||||
registry["routerrpc.Router.XDeleteLocalChanAliases"] = func(ctx context.Context,
|
||||
conn *grpc.ClientConn, reqJSON string, callback func(string, error)) {
|
||||
|
||||
req := &DeleteAliasesRequest{}
|
||||
err := marshaler.Unmarshal([]byte(reqJSON), req)
|
||||
if err != nil {
|
||||
callback("", err)
|
||||
return
|
||||
}
|
||||
|
||||
client := NewRouterClient(conn)
|
||||
resp, err := client.XDeleteLocalChanAliases(ctx, req)
|
||||
if err != nil {
|
||||
callback("", err)
|
||||
return
|
||||
}
|
||||
|
||||
respBytes, err := marshaler.Marshal(resp)
|
||||
if err != nil {
|
||||
callback("", err)
|
||||
return
|
||||
}
|
||||
callback(string(respBytes), nil)
|
||||
}
|
||||
}
|
||||
|
@ -176,6 +176,23 @@ service Router {
|
||||
*/
|
||||
rpc UpdateChanStatus (UpdateChanStatusRequest)
|
||||
returns (UpdateChanStatusResponse);
|
||||
|
||||
/*
|
||||
XAddLocalChanAliases is an experimental API that creates a set of new
|
||||
channel SCID alias mappings. The list of successfully created mappings is
|
||||
returned. This is only a locally stored alias, and will not be communicated
|
||||
to the channel peer via any message. Therefore, routing over such an alias
|
||||
will only work of the peer also calls this same RPC on their end.
|
||||
*/
|
||||
rpc XAddLocalChanAliases (AddAliasesRequest) returns (AddAliasesResponse);
|
||||
|
||||
/*
|
||||
XDeleteLocalChanAliases is an experimental API that deletes a set of new
|
||||
alias mappings. The list of successfully deleted mappings is returned. The
|
||||
deletion will not be communicated to the channel peer via any message.
|
||||
*/
|
||||
rpc XDeleteLocalChanAliases (DeleteAliasesRequest)
|
||||
returns (DeleteAliasesResponse);
|
||||
}
|
||||
|
||||
message SendPaymentRequest {
|
||||
@ -1030,3 +1047,19 @@ enum ChanStatusAction {
|
||||
|
||||
message UpdateChanStatusResponse {
|
||||
}
|
||||
|
||||
message AddAliasesRequest {
|
||||
repeated lnrpc.AliasMap alias_maps = 1;
|
||||
}
|
||||
|
||||
message AddAliasesResponse {
|
||||
repeated lnrpc.AliasMap alias_maps = 1;
|
||||
}
|
||||
|
||||
message DeleteAliasesRequest {
|
||||
repeated lnrpc.AliasMap alias_maps = 1;
|
||||
}
|
||||
|
||||
message DeleteAliasesResponse {
|
||||
repeated lnrpc.AliasMap alias_maps = 1;
|
||||
}
|
@ -514,6 +514,72 @@
|
||||
]
|
||||
}
|
||||
},
|
||||
"/v2/router/x/addaliases": {
|
||||
"post": {
|
||||
"summary": "XAddLocalChanAliases is an experimental API that creates a set of new\nchannel SCID alias mappings. The list of successfully created mappings is\nreturned. This is only a locally stored alias, and will not be communicated\nto the channel peer via any message. Therefore, routing over such an alias\nwill only work of the peer also calls this same RPC on their end.",
|
||||
"operationId": "Router_XAddLocalChanAliases",
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "A successful response.",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/routerrpcAddAliasesResponse"
|
||||
}
|
||||
},
|
||||
"default": {
|
||||
"description": "An unexpected error response.",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/rpcStatus"
|
||||
}
|
||||
}
|
||||
},
|
||||
"parameters": [
|
||||
{
|
||||
"name": "body",
|
||||
"in": "body",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"$ref": "#/definitions/routerrpcAddAliasesRequest"
|
||||
}
|
||||
}
|
||||
],
|
||||
"tags": [
|
||||
"Router"
|
||||
]
|
||||
}
|
||||
},
|
||||
"/v2/router/x/deletealiases": {
|
||||
"post": {
|
||||
"summary": "XDeleteLocalChanAliases is an experimental API that deletes a set of new\nalias mappings. The list of successfully deleted mappings is returned. The\ndeletion will not be communicated to the channel peer via any message.",
|
||||
"operationId": "Router_XDeleteLocalChanAliases",
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "A successful response.",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/routerrpcDeleteAliasesResponse"
|
||||
}
|
||||
},
|
||||
"default": {
|
||||
"description": "An unexpected error response.",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/rpcStatus"
|
||||
}
|
||||
}
|
||||
},
|
||||
"parameters": [
|
||||
{
|
||||
"name": "body",
|
||||
"in": "body",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"$ref": "#/definitions/routerrpcDeleteAliasesRequest"
|
||||
}
|
||||
}
|
||||
],
|
||||
"tags": [
|
||||
"Router"
|
||||
]
|
||||
}
|
||||
},
|
||||
"/v2/router/x/importhistory": {
|
||||
"post": {
|
||||
"summary": "lncli: `importmc`\nXImportMissionControl is an experimental API that imports the state provided\nto the internal mission control's state, using all results which are more\nrecent than our existing values. These values will only be imported\nin-memory, and will not be persisted across restarts.",
|
||||
@ -619,6 +685,24 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"lnrpcAliasMap": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"base_scid": {
|
||||
"type": "string",
|
||||
"format": "uint64",
|
||||
"description": "For non-zero-conf channels, this is the confirmed SCID. Otherwise, this is\nthe first assigned \"base\" alias."
|
||||
},
|
||||
"aliases": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string",
|
||||
"format": "uint64"
|
||||
},
|
||||
"description": "The set of all aliases stored for the base SCID."
|
||||
}
|
||||
}
|
||||
},
|
||||
"lnrpcChannelPoint": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
@ -1099,6 +1183,28 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"routerrpcAddAliasesRequest": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"alias_maps": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/lnrpcAliasMap"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"routerrpcAddAliasesResponse": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"alias_maps": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/lnrpcAliasMap"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"routerrpcAprioriParameters": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
@ -1210,6 +1316,28 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"routerrpcDeleteAliasesRequest": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"alias_maps": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/lnrpcAliasMap"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"routerrpcDeleteAliasesResponse": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"alias_maps": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/lnrpcAliasMap"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"routerrpcFailureDetail": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
|
@ -48,3 +48,10 @@ http:
|
||||
- selector: routerrpc.Router.UpdateChanStatus
|
||||
post: "/v2/router/updatechanstatus"
|
||||
body: "*"
|
||||
- selector: routerrpc.Router.XAddLocalChanAliases
|
||||
post: "/v2/router/x/addaliases"
|
||||
body: "*"
|
||||
- selector: routerrpc.Router.XDeleteLocalChanAliases
|
||||
post: "/v2/router/x/deletealiases"
|
||||
body: "*"
|
||||
|
||||
|
@ -116,6 +116,16 @@ type RouterClient interface {
|
||||
// channel to stay disabled until a subsequent manual request of either
|
||||
// "enable" or "auto".
|
||||
UpdateChanStatus(ctx context.Context, in *UpdateChanStatusRequest, opts ...grpc.CallOption) (*UpdateChanStatusResponse, error)
|
||||
// XAddLocalChanAliases is an experimental API that creates a set of new
|
||||
// channel SCID alias mappings. The list of successfully created mappings is
|
||||
// returned. This is only a locally stored alias, and will not be communicated
|
||||
// to the channel peer via any message. Therefore, routing over such an alias
|
||||
// will only work of the peer also calls this same RPC on their end.
|
||||
XAddLocalChanAliases(ctx context.Context, in *AddAliasesRequest, opts ...grpc.CallOption) (*AddAliasesResponse, error)
|
||||
// XDeleteLocalChanAliases is an experimental API that deletes a set of new
|
||||
// alias mappings. The list of successfully deleted mappings is returned. The
|
||||
// deletion will not be communicated to the channel peer via any message.
|
||||
XDeleteLocalChanAliases(ctx context.Context, in *DeleteAliasesRequest, opts ...grpc.CallOption) (*DeleteAliasesResponse, error)
|
||||
}
|
||||
|
||||
type routerClient struct {
|
||||
@ -451,6 +461,24 @@ func (c *routerClient) UpdateChanStatus(ctx context.Context, in *UpdateChanStatu
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *routerClient) XAddLocalChanAliases(ctx context.Context, in *AddAliasesRequest, opts ...grpc.CallOption) (*AddAliasesResponse, error) {
|
||||
out := new(AddAliasesResponse)
|
||||
err := c.cc.Invoke(ctx, "/routerrpc.Router/XAddLocalChanAliases", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *routerClient) XDeleteLocalChanAliases(ctx context.Context, in *DeleteAliasesRequest, opts ...grpc.CallOption) (*DeleteAliasesResponse, error) {
|
||||
out := new(DeleteAliasesResponse)
|
||||
err := c.cc.Invoke(ctx, "/routerrpc.Router/XDeleteLocalChanAliases", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
// RouterServer is the server API for Router service.
|
||||
// All implementations must embed UnimplementedRouterServer
|
||||
// for forward compatibility
|
||||
@ -552,6 +580,16 @@ type RouterServer interface {
|
||||
// channel to stay disabled until a subsequent manual request of either
|
||||
// "enable" or "auto".
|
||||
UpdateChanStatus(context.Context, *UpdateChanStatusRequest) (*UpdateChanStatusResponse, error)
|
||||
// XAddLocalChanAliases is an experimental API that creates a set of new
|
||||
// channel SCID alias mappings. The list of successfully created mappings is
|
||||
// returned. This is only a locally stored alias, and will not be communicated
|
||||
// to the channel peer via any message. Therefore, routing over such an alias
|
||||
// will only work of the peer also calls this same RPC on their end.
|
||||
XAddLocalChanAliases(context.Context, *AddAliasesRequest) (*AddAliasesResponse, error)
|
||||
// XDeleteLocalChanAliases is an experimental API that deletes a set of new
|
||||
// alias mappings. The list of successfully deleted mappings is returned. The
|
||||
// deletion will not be communicated to the channel peer via any message.
|
||||
XDeleteLocalChanAliases(context.Context, *DeleteAliasesRequest) (*DeleteAliasesResponse, error)
|
||||
mustEmbedUnimplementedRouterServer()
|
||||
}
|
||||
|
||||
@ -613,6 +651,12 @@ func (UnimplementedRouterServer) HtlcInterceptor(Router_HtlcInterceptorServer) e
|
||||
func (UnimplementedRouterServer) UpdateChanStatus(context.Context, *UpdateChanStatusRequest) (*UpdateChanStatusResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method UpdateChanStatus not implemented")
|
||||
}
|
||||
func (UnimplementedRouterServer) XAddLocalChanAliases(context.Context, *AddAliasesRequest) (*AddAliasesResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method XAddLocalChanAliases not implemented")
|
||||
}
|
||||
func (UnimplementedRouterServer) XDeleteLocalChanAliases(context.Context, *DeleteAliasesRequest) (*DeleteAliasesResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method XDeleteLocalChanAliases not implemented")
|
||||
}
|
||||
func (UnimplementedRouterServer) mustEmbedUnimplementedRouterServer() {}
|
||||
|
||||
// UnsafeRouterServer may be embedded to opt out of forward compatibility for this service.
|
||||
@ -976,6 +1020,42 @@ func _Router_UpdateChanStatus_Handler(srv interface{}, ctx context.Context, dec
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _Router_XAddLocalChanAliases_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(AddAliasesRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(RouterServer).XAddLocalChanAliases(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/routerrpc.Router/XAddLocalChanAliases",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(RouterServer).XAddLocalChanAliases(ctx, req.(*AddAliasesRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _Router_XDeleteLocalChanAliases_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(DeleteAliasesRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(RouterServer).XDeleteLocalChanAliases(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/routerrpc.Router/XDeleteLocalChanAliases",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(RouterServer).XDeleteLocalChanAliases(ctx, req.(*DeleteAliasesRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
// Router_ServiceDesc is the grpc.ServiceDesc for Router service.
|
||||
// It's only intended for direct use with grpc.RegisterService,
|
||||
// and not to be introspected or modified (even as a copy)
|
||||
@ -1027,6 +1107,14 @@ var Router_ServiceDesc = grpc.ServiceDesc{
|
||||
MethodName: "UpdateChanStatus",
|
||||
Handler: _Router_UpdateChanStatus_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "XAddLocalChanAliases",
|
||||
Handler: _Router_XAddLocalChanAliases_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "XDeleteLocalChanAliases",
|
||||
Handler: _Router_XDeleteLocalChanAliases_Handler,
|
||||
},
|
||||
},
|
||||
Streams: []grpc.StreamDesc{
|
||||
{
|
||||
|
@ -142,6 +142,14 @@ var (
|
||||
Entity: "offchain",
|
||||
Action: "write",
|
||||
}},
|
||||
"/routerrpc.Router/XAddLocalChanAliases": {{
|
||||
Entity: "offchain",
|
||||
Action: "write",
|
||||
}},
|
||||
"/routerrpc.Router/XDeleteLocalChanAliases": {{
|
||||
Entity: "offchain",
|
||||
Action: "write",
|
||||
}},
|
||||
}
|
||||
|
||||
// DefaultRouterMacFilename is the default name of the router macaroon
|
||||
@ -1506,6 +1514,132 @@ func (s *Server) HtlcInterceptor(stream Router_HtlcInterceptorServer) error {
|
||||
).run()
|
||||
}
|
||||
|
||||
// XAddLocalChanAliases is an experimental API that creates a set of new
|
||||
// channel SCID alias mappings. The list of successfully created mappings is
|
||||
// returned. This is only a locally stored alias, and will not be communicated
|
||||
// to the channel peer via any message. Therefore, routing over such an alias
|
||||
// will only work of the peer also calls this same RPC on their end.
|
||||
func (s *Server) XAddLocalChanAliases(_ context.Context,
|
||||
in *AddAliasesRequest) (*AddAliasesResponse, error) {
|
||||
|
||||
// Create a map that will store the successfully created scid mappings.
|
||||
scidMap := make(
|
||||
map[lnwire.ShortChannelID][]lnwire.ShortChannelID,
|
||||
)
|
||||
|
||||
for _, v := range in.AliasMaps {
|
||||
baseScid := lnwire.NewShortChanIDFromInt(v.BaseScid)
|
||||
|
||||
existingAliases := s.cfg.AliasMgr.ListAliases()
|
||||
|
||||
for _, rpcAlias := range v.Aliases {
|
||||
exists := false
|
||||
|
||||
// Check if the alias already exists in the alias map.
|
||||
for base, aliases := range existingAliases {
|
||||
for _, alias := range aliases {
|
||||
exists = alias.ToUint64() == rpcAlias
|
||||
|
||||
// Trying to add an alias that we
|
||||
// already have for another channel is
|
||||
// wrong.
|
||||
if exists && base != baseScid {
|
||||
return nil, fmt.Errorf("alias "+
|
||||
"%v already exists "+
|
||||
"for base scid %v",
|
||||
alias, base)
|
||||
}
|
||||
|
||||
if exists {
|
||||
break
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// If the alias already exists, skip it.
|
||||
if exists {
|
||||
continue
|
||||
}
|
||||
|
||||
aliasScid := lnwire.NewShortChanIDFromInt(rpcAlias)
|
||||
|
||||
err := s.cfg.AliasMgr.AddLocalAlias(
|
||||
aliasScid, baseScid, false, true,
|
||||
)
|
||||
if err != nil {
|
||||
log.Warnf("Could not create scid alias, "+
|
||||
"base_scid=%v, alias_scid=%v", baseScid,
|
||||
aliasScid)
|
||||
|
||||
continue
|
||||
}
|
||||
|
||||
_, exists = scidMap[baseScid]
|
||||
|
||||
// If internal map is nil, initialize it.
|
||||
if !exists {
|
||||
scidMap[baseScid] = make(
|
||||
[]lnwire.ShortChannelID, 0,
|
||||
)
|
||||
}
|
||||
|
||||
scidMap[baseScid] = append(scidMap[baseScid], aliasScid)
|
||||
}
|
||||
}
|
||||
|
||||
return &AddAliasesResponse{
|
||||
AliasMaps: lnrpc.MarshalAliasMap(scidMap),
|
||||
}, nil
|
||||
}
|
||||
|
||||
// XDeleteLocalChanAliases is an experimental API that deletes a set of new
|
||||
// alias mappings. The list of successfully deleted mappings is returned. The
|
||||
// deletion will not be communicated to the channel peer via any message.
|
||||
func (s *Server) XDeleteLocalChanAliases(_ context.Context,
|
||||
in *DeleteAliasesRequest) (*DeleteAliasesResponse,
|
||||
error) {
|
||||
|
||||
// Create a map that will store the successfully deleted scid alias
|
||||
// mappings.
|
||||
scidMap := make(
|
||||
map[lnwire.ShortChannelID][]lnwire.ShortChannelID,
|
||||
)
|
||||
|
||||
for _, v := range in.AliasMaps {
|
||||
baseScid := lnwire.NewShortChanIDFromInt(v.BaseScid)
|
||||
|
||||
for _, alias := range v.Aliases {
|
||||
aliasScid := lnwire.NewShortChanIDFromInt(alias)
|
||||
|
||||
err := s.cfg.AliasMgr.DeleteLocalAlias(
|
||||
aliasScid, baseScid,
|
||||
)
|
||||
if err != nil {
|
||||
log.Warnf("Could not create scid alias, "+
|
||||
"base_scid=%v, alias_scid=%v", baseScid,
|
||||
aliasScid)
|
||||
|
||||
continue
|
||||
}
|
||||
|
||||
_, exists := scidMap[baseScid]
|
||||
|
||||
// If internal map is nil, initialize it.
|
||||
if !exists {
|
||||
scidMap[baseScid] = make(
|
||||
[]lnwire.ShortChannelID, 0,
|
||||
)
|
||||
}
|
||||
|
||||
scidMap[baseScid] = append(scidMap[baseScid], aliasScid)
|
||||
}
|
||||
}
|
||||
|
||||
return &DeleteAliasesResponse{
|
||||
AliasMaps: lnrpc.MarshalAliasMap(scidMap),
|
||||
}, nil
|
||||
}
|
||||
|
||||
func extractOutPoint(req *UpdateChanStatusRequest) (*wire.OutPoint, error) {
|
||||
chanPoint := req.GetChanPoint()
|
||||
txid, err := lnrpc.GetChanPointFundingTxid(chanPoint)
|
||||
|
@ -7,6 +7,7 @@ import (
|
||||
"github.com/btcsuite/btcd/wire"
|
||||
"github.com/lightningnetwork/lnd/lnrpc"
|
||||
"github.com/lightningnetwork/lnd/lnrpc/chainrpc"
|
||||
"github.com/lightningnetwork/lnd/lnrpc/devrpc"
|
||||
"github.com/lightningnetwork/lnd/lnrpc/invoicesrpc"
|
||||
"github.com/lightningnetwork/lnd/lnrpc/neutrinorpc"
|
||||
"github.com/lightningnetwork/lnd/lnrpc/peersrpc"
|
||||
@ -42,6 +43,7 @@ type HarnessRPC struct {
|
||||
ChainKit chainrpc.ChainKitClient
|
||||
NeutrinoKit neutrinorpc.NeutrinoKitClient
|
||||
Peer peersrpc.PeersClient
|
||||
DevRPC devrpc.DevClient
|
||||
|
||||
// Name is the HarnessNode's name.
|
||||
Name string
|
||||
@ -73,6 +75,7 @@ func NewHarnessRPC(ctxt context.Context, t *testing.T, c *grpc.ClientConn,
|
||||
ChainKit: chainrpc.NewChainKitClient(c),
|
||||
NeutrinoKit: neutrinorpc.NewNeutrinoKitClient(c),
|
||||
Peer: peersrpc.NewPeersClient(c),
|
||||
DevRPC: devrpc.NewDevClient(c),
|
||||
Name: name,
|
||||
}
|
||||
|
||||
|
@ -193,6 +193,26 @@ func (h *HarnessRPC) HtlcInterceptor() (InterceptorClient, context.CancelFunc) {
|
||||
return resp, cancel
|
||||
}
|
||||
|
||||
// AddAliases adds a list of aliases to the node's alias map.
|
||||
func (h *HarnessRPC) XAddLocalChanAliases(req *routerrpc.AddAliasesRequest) {
|
||||
ctxt, cancel := context.WithTimeout(h.runCtx, DefaultTimeout)
|
||||
defer cancel()
|
||||
|
||||
_, err := h.Router.XAddLocalChanAliases(ctxt, req)
|
||||
h.NoError(err, "AddAliases")
|
||||
}
|
||||
|
||||
// DeleteAliases deleted a set of alias mappings.
|
||||
func (h *HarnessRPC) XDeleteLocalChanAliases(
|
||||
req *routerrpc.DeleteAliasesRequest) {
|
||||
|
||||
ctxt, cancel := context.WithTimeout(h.runCtx, DefaultTimeout)
|
||||
defer cancel()
|
||||
|
||||
_, err := h.Router.XDeleteLocalChanAliases(ctxt, req)
|
||||
h.NoError(err, "AddAliases")
|
||||
}
|
||||
|
||||
type TrackPaymentsClient routerrpc.Router_TrackPaymentsClient
|
||||
|
||||
// TrackPayments makes a RPC call to the node's RouterClient and asserts.
|
||||
|
@ -357,7 +357,7 @@ type Config struct {
|
||||
|
||||
// AddLocalAlias persists an alias to an underlying alias store.
|
||||
AddLocalAlias func(alias, base lnwire.ShortChannelID,
|
||||
gossip bool) error
|
||||
gossip, liveUpdate bool) error
|
||||
|
||||
// AuxLeafStore is an optional store that can be used to store auxiliary
|
||||
// leaves for certain custom channel types.
|
||||
@ -838,6 +838,7 @@ func (p *Brontide) loadActiveChannels(chans []*channeldb.OpenChannel) (
|
||||
|
||||
err = p.cfg.AddLocalAlias(
|
||||
aliasScid, dbChan.ShortChanID(), false,
|
||||
false,
|
||||
)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
|
15
rpcserver.go
15
rpcserver.go
@ -763,7 +763,7 @@ func (r *rpcServer) addDeps(s *server, macService *macaroons.Service,
|
||||
s.sweeper, tower, s.towerClientMgr, r.cfg.net.ResolveTCPAddr,
|
||||
genInvoiceFeatures, genAmpInvoiceFeatures,
|
||||
s.getNodeAnnouncement, s.updateAndBrodcastSelfNode, parseAddr,
|
||||
rpcsLog, s.aliasMgr.GetPeerAlias,
|
||||
rpcsLog, s.aliasMgr,
|
||||
)
|
||||
if err != nil {
|
||||
return err
|
||||
@ -8275,17 +8275,8 @@ func (r *rpcServer) ListAliases(ctx context.Context,
|
||||
AliasMaps: make([]*lnrpc.AliasMap, 0),
|
||||
}
|
||||
|
||||
for base, set := range mapAliases {
|
||||
rpcMap := &lnrpc.AliasMap{
|
||||
BaseScid: base.ToUint64(),
|
||||
}
|
||||
for _, alias := range set {
|
||||
rpcMap.Aliases = append(
|
||||
rpcMap.Aliases, alias.ToUint64(),
|
||||
)
|
||||
}
|
||||
resp.AliasMaps = append(resp.AliasMaps, rpcMap)
|
||||
}
|
||||
// Now we need to parse the created mappings into an rpc response.
|
||||
resp.AliasMaps = lnrpc.MarshalAliasMap(mapAliases)
|
||||
|
||||
return resp, nil
|
||||
}
|
||||
|
13
server.go
13
server.go
@ -639,7 +639,18 @@ func newServer(cfg *Config, listenAddrs []net.Addr,
|
||||
thresholdSats := btcutil.Amount(cfg.DustThreshold)
|
||||
thresholdMSats := lnwire.NewMSatFromSatoshis(thresholdSats)
|
||||
|
||||
s.aliasMgr, err = aliasmgr.NewManager(dbs.ChanStateDB)
|
||||
linkUpdater := func(shortID lnwire.ShortChannelID) error {
|
||||
link, err := s.htlcSwitch.GetLinkByShortID(shortID)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
s.htlcSwitch.UpdateLinkAliases(link)
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
s.aliasMgr, err = aliasmgr.NewManager(dbs.ChanStateDB, linkUpdater)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
@ -7,6 +7,7 @@ import (
|
||||
|
||||
"github.com/btcsuite/btcd/chaincfg"
|
||||
"github.com/btcsuite/btclog"
|
||||
"github.com/lightningnetwork/lnd/aliasmgr"
|
||||
"github.com/lightningnetwork/lnd/autopilot"
|
||||
"github.com/lightningnetwork/lnd/chainreg"
|
||||
"github.com/lightningnetwork/lnd/channeldb"
|
||||
@ -122,7 +123,7 @@ func (s *subRPCServerConfigs) PopulateDependencies(cfg *Config,
|
||||
modifiers ...netann.NodeAnnModifier) error,
|
||||
parseAddr func(addr string) (net.Addr, error),
|
||||
rpcLogger btclog.Logger,
|
||||
getAlias func(lnwire.ChannelID) (lnwire.ShortChannelID, error)) error {
|
||||
aliasMgr *aliasmgr.Manager) error {
|
||||
|
||||
// First, we'll use reflect to obtain a version of the config struct
|
||||
// that allows us to programmatically inspect its fields.
|
||||
@ -264,7 +265,7 @@ func (s *subRPCServerConfigs) PopulateDependencies(cfg *Config,
|
||||
reflect.ValueOf(genAmpInvoiceFeatures),
|
||||
)
|
||||
subCfgValue.FieldByName("GetAlias").Set(
|
||||
reflect.ValueOf(getAlias),
|
||||
reflect.ValueOf(aliasMgr.GetPeerAlias),
|
||||
)
|
||||
|
||||
case *neutrinorpc.Config:
|
||||
@ -277,6 +278,11 @@ func (s *subRPCServerConfigs) PopulateDependencies(cfg *Config,
|
||||
// RouterRPC isn't conditionally compiled and doesn't need to be
|
||||
// populated using reflection.
|
||||
case *routerrpc.Config:
|
||||
subCfgValue := extractReflectValue(subCfg)
|
||||
|
||||
subCfgValue.FieldByName("AliasMgr").Set(
|
||||
reflect.ValueOf(aliasMgr),
|
||||
)
|
||||
|
||||
case *watchtowerrpc.Config:
|
||||
subCfgValue := extractReflectValue(subCfg)
|
||||
|
Loading…
x
Reference in New Issue
Block a user