From a144a72ab55d7c240f3c278808e289f501f7b9e4 Mon Sep 17 00:00:00 2001 From: Dusan Brajovic Date: Thu, 28 Mar 2024 13:28:02 +0100 Subject: [PATCH] log --- orchestrator/cosmos/network.go | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/orchestrator/cosmos/network.go b/orchestrator/cosmos/network.go index b4023052..f9fc8eed 100644 --- a/orchestrator/cosmos/network.go +++ b/orchestrator/cosmos/network.go @@ -37,14 +37,6 @@ type Network interface { } func NewNetwork(k keyring.Keyring, ethSignFn keystore.PersonalSignFn, cfg NetworkConfig) (Network, error) { - log.WithFields(log.Fields{ - "chain_id": cfg.ChainID, - "orchestrator_addr": cfg.ValidatorAddress, - "grpc": cfg.CosmosGRPC, - "tendermint_rpc": cfg.TendermintRPC, - "gas_price": cfg.GasPrice, - }).Debugln("Injective network config") - clientCfg := cfg.loadClientConfig() clientCtx, err := chain.NewClientContext(clientCfg.ChainId, cfg.ValidatorAddress, k) @@ -108,10 +100,14 @@ func awaitConnection(client chain.ChainClient, timeout time.Duration) *grpc.Clie func (cfg NetworkConfig) loadClientConfig() clientcommon.Network { if custom := cfg.CosmosGRPC != "" && cfg.TendermintRPC != ""; custom { + log.WithFields(log.Fields{"cosmos_grpc": cfg.CosmosGRPC, "tendermint_rpc": cfg.TendermintRPC}).Debugln("using custom endpoints for Injective") return customEndpoints(cfg) } - return loadBalancedEndpoints(cfg) + c := loadBalancedEndpoints(cfg) + log.WithFields(log.Fields{"cosmos_grpc": c.ChainGrpcEndpoint, "tendermint_rpc": c.TmEndpoint}).Debugln("using load balanced endpoints for Injective") + + return c } func customEndpoints(cfg NetworkConfig) clientcommon.Network {