lnrpc: expose network name in GetInfo
Previously only a testnet boolean was available which made it impossible to distinguish between regtest and mainnet.
This commit is contained in:
5 files changed
+661
-567
No files matched your search
+603
-551
File diff suppressed because it is too large.
Load diff
+17
-4
@@ -1134,11 +1134,13 @@ message GetInfoResponse {
|
||||
/// Whether the wallet's view is synced to the main chain
|
||||
bool synced_to_chain = 9 [json_name = "synced_to_chain"];
|
||||
|
||||
/// Whether the current node is connected to testnet
|
||||
bool testnet = 10 [json_name = "testnet"];
|
||||
/**
|
||||
Whether the current node is connected to testnet. This field is
|
||||
deprecated and the network field should be used instead
|
||||
**/
|
||||
bool testnet = 10 [json_name = "testnet", deprecated = true];
|
||||
|
||||
/// A list of active chains the node is connected to
|
||||
repeated string chains = 11 [json_name = "chains"];
|
||||
reserved 11;
|
||||
|
||||
/// The URIs of the current node.
|
||||
repeated string uris = 12 [json_name = "uris"];
|
||||
@@ -1151,6 +1153,17 @@ message GetInfoResponse {
|
||||
|
||||
/// Number of inactive channels
|
||||
uint32 num_inactive_channels = 15 [json_name = "num_inactive_channels"];
|
||||
|
||||
/// A list of active chains the node is connected to
|
||||
repeated Chain chains = 16 [json_name = "chains"];
|
||||
}
|
||||
|
||||
message Chain {
|
||||
/// The blockchain the node is on (eg bitcoin, litecoin)
|
||||
string chain = 1 [json_name = "chain"];
|
||||
|
||||
/// The network the node is on (eg regtest, testnet, mainnet)
|
||||
string network = 2 [json_name = "network"];
|
||||
}
|
||||
|
||||
message ConfirmationUpdate {
|
||||
|
||||
+19
-8
@@ -1284,6 +1284,17 @@
|
||||
"description": "- `p2wkh`: Pay to witness key hash (`WITNESS_PUBKEY_HASH` = 0)\n- `np2wkh`: Pay to nested witness key hash (`NESTED_PUBKEY_HASH` = 1)",
|
||||
"title": "* \n`AddressType` has to be one of:"
|
||||
},
|
||||
"lnrpcChain": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"chain": {
|
||||
"type": "string"
|
||||
},
|
||||
"network": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"lnrpcChangePasswordRequest": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
@@ -1859,14 +1870,7 @@
|
||||
"testnet": {
|
||||
"type": "boolean",
|
||||
"format": "boolean",
|
||||
"title": "/ Whether the current node is connected to testnet"
|
||||
},
|
||||
"chains": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
},
|
||||
"title": "/ A list of active chains the node is connected to"
|
||||
"title": "* \nWhether the current node is connected to testnet. This field is \ndeprecated and the network field should be used instead"
|
||||
},
|
||||
"uris": {
|
||||
"type": "array",
|
||||
@@ -1888,6 +1892,13 @@
|
||||
"type": "integer",
|
||||
"format": "int64",
|
||||
"title": "/ Number of inactive channels"
|
||||
},
|
||||
"chains": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/lnrpcChain"
|
||||
},
|
||||
"title": "/ A list of active chains the node is connected to"
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
Reference in new issue
Block a user