From be817c151b0f95c6fd461d4b2bcec89aafc8ea81 Mon Sep 17 00:00:00 2001 From: Darioush Jalali Date: Mon, 7 Oct 2024 18:38:01 -0700 Subject: [PATCH 1/3] fix chainID in TestWaitDeployedCornerCases --- accounts/abi/bind/util_test.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/accounts/abi/bind/util_test.go b/accounts/abi/bind/util_test.go index d5754c603a..9ef2621f93 100644 --- a/accounts/abi/bind/util_test.go +++ b/accounts/abi/bind/util_test.go @@ -125,10 +125,12 @@ func TestWaitDeployedCornerCases(t *testing.T) { // Create a transaction to an account. code := "6060604052600a8060106000396000f360606040526008565b00" tx := types.NewTransaction(0, common.HexToAddress("0x01"), big.NewInt(0), 3000000, gasPrice, common.FromHex(code)) - tx, _ = types.SignTx(tx, types.LatestSigner(params.TestChainConfig), testKey) + tx, _ = types.SignTx(tx, types.LatestSignerForChainID(big.NewInt(1337)), testKey) ctx, cancel := context.WithCancel(context.Background()) defer cancel() - backend.Client().SendTransaction(ctx, tx) + if err := backend.Client().SendTransaction(ctx, tx); err != nil { + t.Fatalf("Failed to send transaction: %s", err) + } backend.Commit(true) notContractCreation := errors.New("tx is not contract creation") if _, err := bind.WaitDeployed(ctx, backend.Client(), tx); err.Error() != notContractCreation.Error() { From a4b0730de7b3b2a10030134bf7385b61d8778b71 Mon Sep 17 00:00:00 2001 From: Darioush Jalali Date: Mon, 7 Oct 2024 18:58:18 -0700 Subject: [PATCH 2/3] same --- accounts/abi/bind/util_test.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/accounts/abi/bind/util_test.go b/accounts/abi/bind/util_test.go index 9ef2621f93..3eddeec0b1 100644 --- a/accounts/abi/bind/util_test.go +++ b/accounts/abi/bind/util_test.go @@ -139,7 +139,7 @@ func TestWaitDeployedCornerCases(t *testing.T) { // Create a transaction that is not mined. tx = types.NewContractCreation(1, big.NewInt(0), 3000000, gasPrice, common.FromHex(code)) - tx, _ = types.SignTx(tx, types.LatestSigner(params.TestChainConfig), testKey) + tx, _ = types.SignTx(tx, types.LatestSignerForChainID(big.NewInt(1337)), testKey) go func() { contextCanceled := errors.New("context canceled") @@ -148,6 +148,8 @@ func TestWaitDeployedCornerCases(t *testing.T) { } }() - backend.Client().SendTransaction(ctx, tx) + if err := backend.Client().SendTransaction(ctx, tx); err != nil { + t.Fatalf("Failed to send transaction: %s", err) + } cancel() } From fcbaf246e35d81ab6df9613fd5484e23b25999e4 Mon Sep 17 00:00:00 2001 From: Darioush Jalali Date: Tue, 15 Oct 2024 17:31:56 -0700 Subject: [PATCH 3/3] add flake --- scripts/known_flakes.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/scripts/known_flakes.txt b/scripts/known_flakes.txt index 05c41794ba..b28b4e710c 100644 --- a/scripts/known_flakes.txt +++ b/scripts/known_flakes.txt @@ -7,5 +7,6 @@ TestResumeSyncAccountsTrieInterrupted TestResyncNewRootAfterDeletes TestTransactionSkipIndexing TestVMShutdownWhileSyncing +TestWaitDeployedCornerCases TestWalletNotifications TestWebsocketLargeRead \ No newline at end of file