Skip to content

Commit

Permalink
fix: lint
Browse files Browse the repository at this point in the history
  • Loading branch information
rootulp committed Oct 3, 2024
1 parent ad1f3b3 commit ac0e7fc
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 19 deletions.
19 changes: 3 additions & 16 deletions app/app_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
)

Expand Down Expand Up @@ -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
}
Expand All @@ -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{}

Expand Down
2 changes: 1 addition & 1 deletion tools/blocketa/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
> 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.
4 changes: 2 additions & 2 deletions tools/chainbuilder/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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}
```

Expand Down

0 comments on commit ac0e7fc

Please sign in to comment.