From ded793f1630d4c65929d886d222b6d9026387736 Mon Sep 17 00:00:00 2001 From: Bryan White Date: Sat, 11 Nov 2023 01:34:56 +0100 Subject: [PATCH] wip: debugging --- pkg/relayer/cmd/cmd.go | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/pkg/relayer/cmd/cmd.go b/pkg/relayer/cmd/cmd.go index ec18040e2..ff3e1c4bd 100644 --- a/pkg/relayer/cmd/cmd.go +++ b/pkg/relayer/cmd/cmd.go @@ -124,11 +124,6 @@ func setupRelayerDependencies( return nil, err } - deps, err = supplyMiner(deps) - if err != nil { - return nil, err - } - // Depends on EventsQueryClient. deps, err = supplyBlockClient(ctx, deps, rpcQueryURL) if err != nil { @@ -141,12 +136,18 @@ func setupRelayerDependencies( return nil, err } - var clientCtx cosmosclient.Context - if err := depinject.Inject(deps, &clientCtx); err != nil { + //var clientCtx cosmosclient.Context + //if err := depinject.Inject(deps, &clientCtx); err != nil { + // panic(err) + //} + + clientCtx, err := cosmosclient.GetClientQueryContext(cmd) + if err != nil { panic(err) } supplierQuerier := suppliertypes.NewQueryClient(clientCtx) supplierQuery := &suppliertypes.QueryGetSupplierRequest{Address: ""} + log.Printf("clientCtx: %+v", clientCtx) _, err = supplierQuerier.Supplier(ctx, supplierQuery) if err != nil { @@ -224,8 +225,6 @@ func supplyClientCtxAndTxFactory( deps depinject.Config, cmd *cobra.Command, ) (depinject.Config, error) { - cosmosclient.GetClientQueryContext(cmd) - clientCtx, err := cosmosclient.GetClientTxContext(cmd) if err != nil { return nil, err