rpcserver: expose interceptor required flag on info call

This commit is contained in:
Joost Jager committed 2022-04-25 11:05:18 +02:00
1 parent 3ad9a42e65
commit caf11d2607
5 files changed
+2070 -2043

No files matched your search

@@ -223,6 +223,9 @@ then watch it on chain. Taproot script spends are also supported through the
* Close a gap in the HTLC interceptor API by [intercepting htlcs in the on-chain
resolution flow](https://github.com/lightningnetwork/lnd/pull/6219) too.
* [Expose](https://github.com/lightningnetwork/lnd/pull/6454) always on mode of
the HTLC interceptor API through GetInfo.
## Database
* [Add ForAll implementation for etcd to speed up
+2039 -2025
View File
File diff suppressed because it is too large. Load diff
+5
View File
@@ -1809,6 +1809,11 @@ message GetInfoResponse {
announcements and invoices.
*/
map<uint32, Feature> features = 19;
/*
Indicates whether the HTLC interceptor API is in always-on mode.
*/
bool require_htlc_interceptor = 21;
}
message GetRecoveryInfoRequest {
+4
View File
@@ -4445,6 +4445,10 @@
"$ref": "#/definitions/lnrpcFeature"
},
"description": "Features that our node has advertised in our init message, node\nannouncements and invoices."
},
"require_htlc_interceptor": {
"type": "boolean",
"description": "Indicates whether the HTLC interceptor API is in always-on mode."
}
}
},
+19 -18
View File
@@ -2802,24 +2802,25 @@ func (r *rpcServer) GetInfo(_ context.Context,
// TODO(roasbeef): add synced height n stuff
return &lnrpc.GetInfoResponse{
IdentityPubkey: encodedIDPub,
NumPendingChannels: nPendingChannels,
NumActiveChannels: activeChannels,
NumInactiveChannels: inactiveChannels,
NumPeers: uint32(len(serverPeers)),
BlockHeight: uint32(bestHeight),
BlockHash: bestHash.String(),
SyncedToChain: isSynced,
Testnet: chainreg.IsTestnet(&r.cfg.ActiveNetParams),
Chains: activeChains,
Uris: uris,
Alias: nodeAnn.Alias.String(),
Color: routing.EncodeHexColor(nodeAnn.RGBColor),
BestHeaderTimestamp: bestHeaderTimestamp,
Version: build.Version() + " commit=" + build.Commit,
CommitHash: build.CommitHash,
SyncedToGraph: isGraphSynced,
Features: features,
IdentityPubkey: encodedIDPub,
NumPendingChannels: nPendingChannels,
NumActiveChannels: activeChannels,
NumInactiveChannels: inactiveChannels,
NumPeers: uint32(len(serverPeers)),
BlockHeight: uint32(bestHeight),
BlockHash: bestHash.String(),
SyncedToChain: isSynced,
Testnet: chainreg.IsTestnet(&r.cfg.ActiveNetParams),
Chains: activeChains,
Uris: uris,
Alias: nodeAnn.Alias.String(),
Color: routing.EncodeHexColor(nodeAnn.RGBColor),
BestHeaderTimestamp: bestHeaderTimestamp,
Version: build.Version() + " commit=" + build.Commit,
CommitHash: build.CommitHash,
SyncedToGraph: isGraphSynced,
Features: features,
RequireHtlcInterceptor: r.cfg.RequireInterceptor,
}, nil
}