diff --git a/chain/cosmos/chain_node.go b/chain/cosmos/chain_node.go index 7487bb1de..90d0e0c33 100644 --- a/chain/cosmos/chain_node.go +++ b/chain/cosmos/chain_node.go @@ -147,7 +147,7 @@ func (tn *ChainNode) NewClient(addr string) error { tn.Client = rpcClient - grpcConn, err := grpc.Dial( + grpcConn, err := grpc.NewClient( tn.hostGRPCPort, grpc.WithTransportCredentials(insecure.NewCredentials()), ) if err != nil { diff --git a/chain/penumbra/penumbra_client_node.go b/chain/penumbra/penumbra_client_node.go index 848912a67..8e210166d 100644 --- a/chain/penumbra/penumbra_client_node.go +++ b/chain/penumbra/penumbra_client_node.go @@ -582,7 +582,7 @@ func (p *PenumbraClientNode) StartContainer(ctx context.Context) error { p.hostGRPCPort = hostPorts[0] - p.GRPCConn, err = grpc.Dial(p.hostGRPCPort, grpc.WithTransportCredentials(insecure.NewCredentials())) + p.GRPCConn, err = grpc.NewClient(p.hostGRPCPort, grpc.WithTransportCredentials(insecure.NewCredentials())) if err != nil { return err } diff --git a/chain/thorchain/thornode.go b/chain/thorchain/thornode.go index 17d137942..06c9134c7 100644 --- a/chain/thorchain/thornode.go +++ b/chain/thorchain/thornode.go @@ -143,7 +143,7 @@ func (tn *ChainNode) NewClient(addr string) error { tn.Client = rpcClient - grpcConn, err := grpc.Dial( + grpcConn, err := grpc.NewClient( tn.hostGRPCPort, grpc.WithTransportCredentials(insecure.NewCredentials()), ) if err != nil { diff --git a/local-interchain/interchain/handlers/chain_registry.go b/local-interchain/interchain/handlers/chain_registry.go index 9895f938e..b98ac522e 100644 --- a/local-interchain/interchain/handlers/chain_registry.go +++ b/local-interchain/interchain/handlers/chain_registry.go @@ -27,5 +27,8 @@ func NewChainRegistry(loc string) *chainRegistry { func (cr chainRegistry) GetChainRegistry(w http.ResponseWriter, r *http.Request) { w.Header().Set("Content-Type", "application/json") w.WriteHeader(http.StatusOK) - w.Write(cr.DataJSON) + if _, err := w.Write(cr.DataJSON); err != nil { + http.Error(w, "failed to write response", http.StatusInternalServerError) + } + }