Skip to content

Commit

Permalink
fix: remove context timeout from initalize connection/channel state (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
viveksharmapoudel authored Sep 8, 2023
1 parent 8301043 commit 058abd8
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 10 deletions.
10 changes: 4 additions & 6 deletions relayer/chains/icon/icon_chain_processor.go
Original file line number Diff line number Diff line change
Expand Up @@ -181,9 +181,8 @@ func (icp *IconChainProcessor) getLastSavedHeight() int64 {
}

func (icp *IconChainProcessor) initializeConnectionState(ctx context.Context) error {
// TODO: review
ctx, cancel := context.WithTimeout(ctx, queryTimeout)
defer cancel()
// ctx, cancel := context.WithTimeout(ctx, queryTimeout)
// defer cancel()

connections, err := icp.chainProvider.QueryConnections(ctx)
if err != nil {
Expand All @@ -208,9 +207,8 @@ func (icp *IconChainProcessor) initializeConnectionState(ctx context.Context) er
}

func (icp *IconChainProcessor) initializeChannelState(ctx context.Context) error {
// TODO:
ctx, cancel := context.WithTimeout(ctx, queryTimeout)
defer cancel()
// ctx, cancel := context.WithTimeout(ctx, queryTimeout)
// defer cancel()
channels, err := icp.chainProvider.QueryChannels(ctx)
if err != nil {
return fmt.Errorf("error querying channels: %w", err)
Expand Down
8 changes: 4 additions & 4 deletions relayer/chains/wasm/wasm_chain_processor.go
Original file line number Diff line number Diff line change
Expand Up @@ -302,8 +302,8 @@ func (ccp *WasmChainProcessor) Run(ctx context.Context, initialBlockHistory uint

// initializeConnectionState will bootstrap the connectionStateCache with the open connection state.
func (ccp *WasmChainProcessor) initializeConnectionState(ctx context.Context) error {
ctx, cancel := context.WithTimeout(ctx, queryTimeout)
defer cancel()
// ctx, cancel := context.WithTimeout(ctx, queryTimeout)
// defer cancel()
connections, err := ccp.chainProvider.QueryConnections(ctx)
if err != nil {
return fmt.Errorf("error querying connections: %w", err)
Expand All @@ -327,8 +327,8 @@ func (ccp *WasmChainProcessor) initializeConnectionState(ctx context.Context) er

// initializeChannelState will bootstrap the channelStateCache with the open channel state.
func (ccp *WasmChainProcessor) initializeChannelState(ctx context.Context) error {
ctx, cancel := context.WithTimeout(ctx, queryTimeout)
defer cancel()
// ctx, cancel := context.WithTimeout(ctx, queryTimeout)
// defer cancel()
channels, err := ccp.chainProvider.QueryChannels(ctx)
if err != nil {
return fmt.Errorf("error querying channels: %w", err)
Expand Down

0 comments on commit 058abd8

Please sign in to comment.