From 49c7182eee0e9c00d5e4105960ad600b098e9164 Mon Sep 17 00:00:00 2001 From: siddimore Date: Wed, 3 Apr 2024 15:10:55 -0700 Subject: [PATCH] [SyntheticTest] Fix Interval (#440) Co-authored-by: Siddharth More --- test/synthetic-test/synthetic_client_test.go | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/test/synthetic-test/synthetic_client_test.go b/test/synthetic-test/synthetic_client_test.go index 17048de2f2..a04e5a0ea7 100644 --- a/test/synthetic-test/synthetic_client_test.go +++ b/test/synthetic-test/synthetic_client_test.go @@ -125,13 +125,16 @@ func setUpClients(pk string, rpcUrl string, mockRollUpContractAddress string, re pk = strings.TrimPrefix(pk, "0X") pk = strings.TrimPrefix(pk, "0x") - ethClient, err := geth.NewClient(geth.EthClientConfig{ - RPCURL: rpcUrl, - PrivateKeyString: pk, - }, ethLogger) + ethConfig := geth.EthClientConfig{ + RPCURLs: []string{rpcUrl}, + PrivateKeyString: pk, + NumConfirmations: 0, + } + ethClient, err := geth.NewClient(ethConfig, gcommon.Address{}, 0, ethLogger) + log.Printf("Error: failed to create eth client: %v", err) if err != nil { - logger.Printf("Error: %v", err) + log.Printf("Error: failed to create eth client: %v", err) } mockRollup, err := rollupbindings.NewContractMockRollup(gcommon.HexToAddress(mockRollUpContractAddress), ethClient) @@ -172,6 +175,7 @@ func TestMain(m *testing.M) { retrieverG1Path := os.Getenv("RETRIEVER_G1_PATH") retrieverG2Path := os.Getenv("RETRIEVER_G2_PATH") retrieverCachePath := os.Getenv("RETRIEVER_CACHE_PATH") + batcherPullInterval := os.Getenv("BATCHER_PULL_INTERVAL") // Retriever Config retrieverClientConfig := &RetrieverClientConfig{ @@ -287,7 +291,8 @@ func TestDisperseBlobEndToEnd(t *testing.T) { logger.Printf("Time to Disperse Blob %s", disperseBlobStopTime.String()) // Set Confirmation DeaLine For Confirmation of Dispersed Blob - confirmationDeadline := time.Now().Add(240 * time.Second) + // Update this to a minute over Batcher_Pull_Interval + confirmationDeadline := time.Now().Add(batcherPullInterval * time.Second) // Start the loop with a timeout mechanism confirmationTicker := time.NewTicker(5 * time.Second)