Skip to content

Commit 267ee81

Browse files
committed
Correct flags usage.
1 parent 6da446b commit 267ee81

File tree

3 files changed

+4
-7
lines changed

3 files changed

+4
-7
lines changed

cmd/sonictool/app/main.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@ func Run() error {
1818
app.Flags = []cli.Flag{
1919
flags.DataDirFlag,
2020
flags.CacheFlag,
21+
flags.LiveDbCacheFlag,
22+
flags.ArchiveCacheFlag,
2123
}
2224
app.Commands = []cli.Command{
2325
{
@@ -60,8 +62,6 @@ Initialize the database using data from the experimental genesis file.
6062
ArgsUsage: "<validators>",
6163
Action: fakeGenesisImport,
6264
Flags: []cli.Flag{
63-
flags.LiveDbCacheFlag,
64-
flags.ArchiveCacheFlag,
6565
ModeFlag,
6666
},
6767
Description: `

cmd/sonictool/db/dbutils.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ type GossipDbParameters struct {
6767
DataDir string
6868
ValidatorMode bool
6969
CacheRatio cachescale.Func
70-
LiveDbCache, ArchiveCache int64
70+
LiveDbCache, ArchiveCache int64 // in bytes
7171
}
7272

7373
func MakeGossipDb(params GossipDbParameters) (*gossip.Store, error) {

tests/integration_test_net.go

+1-4
Original file line numberDiff line numberDiff line change
@@ -164,14 +164,11 @@ func startIntegrationTestNet(directory string, args []string) (*IntegrationTestN
164164
// initialize the data directory for the single node on the test network
165165
// equivalent to running `sonictool --datadir <dataDir> genesis fake 1`
166166
originalArgs := os.Args
167-
os.Args = append([]string{
167+
os.Args = append([]string{
168168
"sonictool",
169169
"--datadir", result.stateDir(),
170-
"genesis",
171-
"fake",
172170
"--statedb.livecache", "1",
173171
"--statedb.archivecache", "1",
174-
"1",
175172
}, args...)
176173
if err := sonictool.Run(); err != nil {
177174
os.Args = originalArgs

0 commit comments

Comments
 (0)