Merge pull request #6454 from bottlepay/require-interceptor-info

rpcserver: expose interceptor required flag on info call
This commit is contained in:
Oliver Gugger 2022-04-25 12:11:29 +02:00 committed by GitHub
commit 0845c4daeb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 2070 additions and 2043 deletions

View File

@ -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

File diff suppressed because it is too large Load Diff

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 {

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."
}
}
},

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: int64(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
}