From 165ee66c4d48aef6aa49dccbaa01c92d955cf210 Mon Sep 17 00:00:00 2001 From: Darioush Jalali Date: Thu, 17 Oct 2024 09:34:50 -0700 Subject: [PATCH 1/2] remove memsize (#1365) --- internal/debug/flags.go | 4 ---- 1 file changed, 4 deletions(-) diff --git a/internal/debug/flags.go b/internal/debug/flags.go index 34289ab921..dfb23fa863 100644 --- a/internal/debug/flags.go +++ b/internal/debug/flags.go @@ -38,7 +38,6 @@ import ( "github.com/ava-labs/subnet-evm/internal/flags" "github.com/ethereum/go-ethereum/log" - "github.com/fjl/memsize/memsizeui" "github.com/mattn/go-colorable" "github.com/mattn/go-isatty" "github.com/urfave/cli/v2" @@ -46,8 +45,6 @@ import ( "gopkg.in/natefinch/lumberjack.v2" ) -var Memsize memsizeui.Handler - var ( verbosityFlag = &cli.IntFlag{ Name: "verbosity", @@ -314,7 +311,6 @@ func Setup(ctx *cli.Context) error { } func StartPProf(address string) { - http.Handle("/memsize/", http.StripPrefix("/memsize", &Memsize)) log.Info("Starting pprof server", "addr", fmt.Sprintf("http://%s/debug/pprof", address)) go func() { if err := http.ListenAndServe(address, nil); err != nil { From 84c536186e2fcc7aec1f8db1b1063de60ce951f8 Mon Sep 17 00:00:00 2001 From: Darioush Jalali Date: Thu, 17 Oct 2024 09:52:58 -0700 Subject: [PATCH 2/2] fix chainID in TestWaitDeployedCornerCases (#1364) --- accounts/abi/bind/util_test.go | 12 ++++++++---- scripts/known_flakes.txt | 1 + 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/accounts/abi/bind/util_test.go b/accounts/abi/bind/util_test.go index 93b03be810..1dfff2f1f5 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() { @@ -137,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") @@ -146,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() } diff --git a/scripts/known_flakes.txt b/scripts/known_flakes.txt index e6652a59b4..6f39599d6c 100644 --- a/scripts/known_flakes.txt +++ b/scripts/known_flakes.txt @@ -8,5 +8,6 @@ TestResumeSyncAccountsTrieInterrupted TestResyncNewRootAfterDeletes TestTransactionSkipIndexing TestVMShutdownWhileSyncing +TestWaitDeployedCornerCases TestWalletNotifications TestWebsocketLargeRead \ No newline at end of file