From ad0fba548fb32c87d3087118039f03df9a8b9297 Mon Sep 17 00:00:00 2001 From: Oliver Gugger Date: Tue, 11 Feb 2020 14:05:42 +0100 Subject: [PATCH] watchtowerrpc: format watchtower.proto and remove json_name fields We now use the jsonpb marshaler to convert the RPC responses to JSON in lncli and REST. The jsonpb has a setting to use the original name as defined in the proto file and the explicit json_name definition is not necessary any more. The jsonpb setting is called OrigName and needs to be true. --- lnrpc/watchtowerrpc/watchtower.proto | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/lnrpc/watchtowerrpc/watchtower.proto b/lnrpc/watchtowerrpc/watchtower.proto index 71c764863..b79b52b00 100644 --- a/lnrpc/watchtowerrpc/watchtower.proto +++ b/lnrpc/watchtowerrpc/watchtower.proto @@ -5,24 +5,24 @@ package watchtowerrpc; option go_package = "github.com/lightningnetwork/lnd/lnrpc/watchtowerrpc"; service Watchtower { - /** lncli: tower info - GetInfo returns general information concerning the companion watchtower - including it's public key and URIs where the server is currently - listening for clients. - */ - rpc GetInfo(GetInfoRequest) returns (GetInfoResponse); + /** lncli: tower info + GetInfo returns general information concerning the companion watchtower + including it's public key and URIs where the server is currently + listening for clients. + */ + rpc GetInfo (GetInfoRequest) returns (GetInfoResponse); } -message GetInfoRequest{ +message GetInfoRequest { } message GetInfoResponse { - /// The public key of the watchtower. - bytes pubkey = 1 [json_name = "pubkey"]; + /// The public key of the watchtower. + bytes pubkey = 1; - /// The listening addresses of the watchtower. - repeated string listeners = 2 [json_name = "listeners"]; + /// The listening addresses of the watchtower. + repeated string listeners = 2; - /// The URIs of the watchtower. - repeated string uris = 3 [json_name = "uris" ]; + /// The URIs of the watchtower. + repeated string uris = 3; }