From 24ee84670f388144329fa9c8b0f9659704d2e64d Mon Sep 17 00:00:00 2001 From: Joel Smith Date: Mon, 28 Oct 2024 15:01:42 -0500 Subject: [PATCH] Update Check Rate --- node/pkg/wormconn/send_tx.go | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/node/pkg/wormconn/send_tx.go b/node/pkg/wormconn/send_tx.go index c6de76d97f..7ba8d5a18f 100644 --- a/node/pkg/wormconn/send_tx.go +++ b/node/pkg/wormconn/send_tx.go @@ -98,13 +98,8 @@ func (c *ClientConn) SignAndBroadcastTx(ctx context.Context, msg sdktypes.Msg) ( if err != nil { return nil, fmt.Errorf("failed to wait for tx inclusion: %w", err) } else { - - fmt.Println("JOEL - TX BROADCASTED BEFORE", txResp.TxResponse) - // update the response with the final result txResp.TxResponse = res.TxResponse - - fmt.Println("JOEL - TX BROADCASTED AFTER", txResp.TxResponse) } return txResp, nil @@ -117,18 +112,18 @@ func waitForBlockInclusion(ctx context.Context, client sdktx.ServiceClient, txHa select { // check if wait timeout is exceeded case <-exitAfter: - fmt.Println("JOEL - TIMED OUT", txHash) + fmt.Println("JOEL - TIMED OUT ", txHash) return nil, fmt.Errorf("timed out after: %d; wait for tx %s to be included in a block", waitTimeout, txHash) // check if in block every second - case <-time.After(100 * time.Millisecond): + case <-time.After(1000 * time.Millisecond): res, err := client.GetTx(ctx, &sdktx.GetTxRequest{Hash: txHash}) if err == nil { - fmt.Print("JOEL - FOUND TX IN BLOCK", txHash) + fmt.Print("JOEL - FOUND TX IN BLOCK ", txHash) return res, nil } // check if context is done case <-ctx.Done(): - fmt.Println("JOEL - CONTEXT DONE", txHash, ctx.Err()) + fmt.Println("JOEL - CONTEXT DONE ", txHash, ctx.Err()) return nil, ctx.Err() } }