From ac0e7fcd6d64594082de63e342566f6496897046 Mon Sep 17 00:00:00 2001 From: Rootul Patel Date: Thu, 3 Oct 2024 15:55:50 -0400 Subject: [PATCH] fix: lint --- app/app_test.go | 19 +++---------------- tools/blocketa/README.md | 2 +- tools/chainbuilder/README.md | 4 ++-- 3 files changed, 6 insertions(+), 19 deletions(-) diff --git a/app/app_test.go b/app/app_test.go index 9ec8949f81..a745ca2f8e 100644 --- a/app/app_test.go +++ b/app/app_test.go @@ -16,10 +16,8 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" abci "github.com/tendermint/tendermint/abci/types" - abcitypes "github.com/tendermint/tendermint/abci/types" "github.com/tendermint/tendermint/libs/log" tmproto "github.com/tendermint/tendermint/proto/tendermint/types" - dbm "github.com/tendermint/tm-db" tmdb "github.com/tendermint/tm-db" ) @@ -158,18 +156,18 @@ func TestOfferSnapshot(t *testing.T) { } func createTestApp(t *testing.T) *app.App { - db := dbm.NewMemDB() + db := tmdb.NewMemDB() config := encoding.MakeConfig(app.ModuleEncodingRegisters...) upgradeHeight := int64(3) snapshotDir := filepath.Join(t.TempDir(), "data", "snapshots") - snapshotDB, err := dbm.NewDB("metadata", dbm.GoLevelDBBackend, snapshotDir) + snapshotDB, err := tmdb.NewDB("metadata", tmdb.GoLevelDBBackend, snapshotDir) require.NoError(t, err) snapshotStore, err := snapshots.NewStore(snapshotDB, snapshotDir) require.NoError(t, err) baseAppOption := baseapp.SetSnapshot(snapshotStore, snapshottypes.NewSnapshotOptions(10, 10)) testApp := app.New(log.NewNopLogger(), db, nil, 0, config, upgradeHeight, util.EmptyAppOptions{}, baseAppOption) require.NoError(t, err) - response := testApp.Info(abcitypes.RequestInfo{}) + response := testApp.Info(abci.RequestInfo{}) require.Equal(t, uint64(0), response.AppVersion) return testApp } @@ -190,17 +188,6 @@ func createRequest() abci.RequestOfferSnapshot { } } -func getSnapshotOption(t *testing.T) func(*baseapp.BaseApp) { - snapshotDir := t.TempDir() - snapshotDB, err := tmdb.NewDB("metadata", tmdb.GoLevelDBBackend, t.TempDir()) - require.NoError(t, err) - snapshotStore, err := snapshots.NewStore(snapshotDB, snapshotDir) - require.NoError(t, err) - interval := uint64(10) - keepRecent := uint32(10) - return baseapp.SetSnapshot(snapshotStore, snapshottypes.NewSnapshotOptions(interval, keepRecent)) -} - // NoopWriter is a no-op implementation of a writer. type NoopWriter struct{} diff --git a/tools/blocketa/README.md b/tools/blocketa/README.md index 1f8c2b4d1b..f7de7539b5 100644 --- a/tools/blocketa/README.md +++ b/tools/blocketa/README.md @@ -15,4 +15,4 @@ arrivalTime: 2024-08-28 17:24:23.483542677 +0000 UTC ``` > [!NOTE] -> The block time is currently hard-coded. If you're running this for a network with a different block time, you'll need to update the `blockTime` constant in the main.go file. You can use [https://www.mintscan.io/celestia/block](https://www.mintscan.io/celestia/block/) or the blocktime tool. \ No newline at end of file +> The block time is currently hard-coded. If you're running this for a network with a different block time, you'll need to update the `blockTime` constant in the main.go file. You can use [https://www.mintscan.io/celestia/block](https://www.mintscan.io/celestia/block/) or the blocktime tool. diff --git a/tools/chainbuilder/README.md b/tools/chainbuilder/README.md index 99911468ac..50ceb3c06d 100644 --- a/tools/chainbuilder/README.md +++ b/tools/chainbuilder/README.md @@ -6,13 +6,13 @@ Use `go` to run the binary as follows: -``` +```shell go run ./tools/chainbuilder ``` This will create a directory with the name `testnode-{chainID}`. All files will be populated and blocks generated based on specified input. You can run a validator on the file system afterwards by calling: -``` +```shell celestia-appd start --home /path/to/testnode-{chainID} ```