mod+cmd/lncli: use google.golang.org/protobuf package

This commit is contained in:
Oliver Gugger committed 2023-05-11 22:51:16 +02:00
1 parent fd9adaf6ce
commit f9436ec05d
11 files changed
+90 -61

No files matched your search

+2 -5
View File
@@ -37,7 +37,6 @@ import (
"github.com/lightningnetwork/lnd/watchtower"
"google.golang.org/grpc"
"google.golang.org/grpc/credentials"
"google.golang.org/protobuf/encoding/protojson"
"gopkg.in/macaroon-bakery.v2/bakery"
"gopkg.in/macaroon.v2"
)
@@ -857,10 +856,8 @@ func startRestProxy(cfg *Config, rpcServer *rpcServer, restDialOpts []grpc.DialO
// that the marshaler prints all values, even if they are falsey.
customMarshalerOption := proxy.WithMarshalerOption(
proxy.MIMEWildcard, &proxy.JSONPb{
MarshalOptions: protojson.MarshalOptions{
UseProtoNames: true,
EmitUnpopulated: true,
},
MarshalOptions: *lnrpc.RESTJsonMarshalOpts,
UnmarshalOptions: *lnrpc.RESTJsonUnmarshalOpts,
},
)
mux := proxy.NewServeMux(