@@ -37,6 +37,7 @@ import (
3737 "github.com/ethereum/go-ethereum/core/types"
3838 "github.com/ethereum/go-ethereum/crypto"
3939 "github.com/ethereum/go-ethereum/ethdb"
40+ "github.com/ethereum/go-ethereum/internal/flags"
4041 "github.com/ethereum/go-ethereum/log"
4142 "github.com/ethereum/go-ethereum/trie"
4243 "github.com/olekukonko/tablewriter"
@@ -77,7 +78,7 @@ Remove blockchain and state databases`,
7778 Action : inspect ,
7879 Name : "inspect" ,
7980 ArgsUsage : "<prefix> <start>" ,
80- Flags : utils . GroupFlags ([]cli.Flag {
81+ Flags : flags . Merge ([]cli.Flag {
8182 utils .SyncModeFlag ,
8283 }, utils .NetworkFlags , utils .DatabasePathFlags ),
8384 Usage : "Inspect the storage size for each type of data in the database" ,
@@ -87,7 +88,7 @@ Remove blockchain and state databases`,
8788 Action : checkStateContent ,
8889 Name : "check-state-content" ,
8990 ArgsUsage : "<start (optional)>" ,
90- Flags : utils . GroupFlags (utils .NetworkFlags , utils .DatabasePathFlags ),
91+ Flags : flags . Merge (utils .NetworkFlags , utils .DatabasePathFlags ),
9192 Usage : "Verify that state data is cryptographically correct" ,
9293 Description : `This command iterates the entire database for 32-byte keys, looking for rlp-encoded trie nodes.
9394For each trie node encountered, it checks that the key corresponds to the keccak256(value). If this is not true, this indicates
@@ -97,15 +98,15 @@ a data corruption.`,
9798 Action : dbStats ,
9899 Name : "stats" ,
99100 Usage : "Print leveldb statistics" ,
100- Flags : utils . GroupFlags ([]cli.Flag {
101+ Flags : flags . Merge ([]cli.Flag {
101102 utils .SyncModeFlag ,
102103 }, utils .NetworkFlags , utils .DatabasePathFlags ),
103104 }
104105 dbCompactCmd = & cli.Command {
105106 Action : dbCompact ,
106107 Name : "compact" ,
107108 Usage : "Compact leveldb database. WARNING: May take a very long time" ,
108- Flags : utils . GroupFlags ([]cli.Flag {
109+ Flags : flags . Merge ([]cli.Flag {
109110 utils .SyncModeFlag ,
110111 utils .CacheFlag ,
111112 utils .CacheDatabaseFlag ,
@@ -119,7 +120,7 @@ corruption if it is aborted during execution'!`,
119120 Name : "get" ,
120121 Usage : "Show the value of a database key" ,
121122 ArgsUsage : "<hex-encoded key>" ,
122- Flags : utils . GroupFlags ([]cli.Flag {
123+ Flags : flags . Merge ([]cli.Flag {
123124 utils .SyncModeFlag ,
124125 }, utils .NetworkFlags , utils .DatabasePathFlags ),
125126 Description : "This command looks up the specified database key from the database." ,
@@ -129,7 +130,7 @@ corruption if it is aborted during execution'!`,
129130 Name : "delete" ,
130131 Usage : "Delete a database key (WARNING: may corrupt your database)" ,
131132 ArgsUsage : "<hex-encoded key>" ,
132- Flags : utils . GroupFlags ([]cli.Flag {
133+ Flags : flags . Merge ([]cli.Flag {
133134 utils .SyncModeFlag ,
134135 }, utils .NetworkFlags , utils .DatabasePathFlags ),
135136 Description : `This command deletes the specified database key from the database.
@@ -140,7 +141,7 @@ WARNING: This is a low-level operation which may cause database corruption!`,
140141 Name : "put" ,
141142 Usage : "Set the value of a database key (WARNING: may corrupt your database)" ,
142143 ArgsUsage : "<hex-encoded key> <hex-encoded value>" ,
143- Flags : utils . GroupFlags ([]cli.Flag {
144+ Flags : flags . Merge ([]cli.Flag {
144145 utils .SyncModeFlag ,
145146 }, utils .NetworkFlags , utils .DatabasePathFlags ),
146147 Description : `This command sets a given database key to the given value.
@@ -151,7 +152,7 @@ WARNING: This is a low-level operation which may cause database corruption!`,
151152 Name : "dumptrie" ,
152153 Usage : "Show the storage key/values of a given storage trie" ,
153154 ArgsUsage : "<hex-encoded storage trie root> <hex-encoded start (optional)> <int max elements (optional)>" ,
154- Flags : utils . GroupFlags ([]cli.Flag {
155+ Flags : flags . Merge ([]cli.Flag {
155156 utils .SyncModeFlag ,
156157 }, utils .NetworkFlags , utils .DatabasePathFlags ),
157158 Description : "This command looks up the specified database key from the database." ,
@@ -161,7 +162,7 @@ WARNING: This is a low-level operation which may cause database corruption!`,
161162 Name : "freezer-index" ,
162163 Usage : "Dump out the index of a given freezer type" ,
163164 ArgsUsage : "<type> <start (int)> <end (int)>" ,
164- Flags : utils . GroupFlags ([]cli.Flag {
165+ Flags : flags . Merge ([]cli.Flag {
165166 utils .SyncModeFlag ,
166167 }, utils .NetworkFlags , utils .DatabasePathFlags ),
167168 Description : "This command displays information about the freezer index." ,
@@ -171,7 +172,7 @@ WARNING: This is a low-level operation which may cause database corruption!`,
171172 Name : "import" ,
172173 Usage : "Imports leveldb-data from an exported RLP dump." ,
173174 ArgsUsage : "<dumpfile> <start (optional)" ,
174- Flags : utils . GroupFlags ([]cli.Flag {
175+ Flags : flags . Merge ([]cli.Flag {
175176 utils .SyncModeFlag ,
176177 }, utils .NetworkFlags , utils .DatabasePathFlags ),
177178 Description : "The import command imports the specific chain data from an RLP encoded stream." ,
@@ -181,7 +182,7 @@ WARNING: This is a low-level operation which may cause database corruption!`,
181182 Name : "export" ,
182183 Usage : "Exports the chain data into an RLP dump. If the <dumpfile> has .gz suffix, gzip compression will be used." ,
183184 ArgsUsage : "<type> <dumpfile>" ,
184- Flags : utils . GroupFlags ([]cli.Flag {
185+ Flags : flags . Merge ([]cli.Flag {
185186 utils .SyncModeFlag ,
186187 }, utils .NetworkFlags , utils .DatabasePathFlags ),
187188 Description : "Exports the specified chain data to an RLP encoded stream, optionally gzip-compressed." ,
@@ -190,7 +191,7 @@ WARNING: This is a low-level operation which may cause database corruption!`,
190191 Action : showMetaData ,
191192 Name : "metadata" ,
192193 Usage : "Shows metadata about the chain status." ,
193- Flags : utils . GroupFlags ([]cli.Flag {
194+ Flags : flags . Merge ([]cli.Flag {
194195 utils .SyncModeFlag ,
195196 }, utils .NetworkFlags , utils .DatabasePathFlags ),
196197 Description : "Shows metadata about the chain status." ,
@@ -200,7 +201,7 @@ WARNING: This is a low-level operation which may cause database corruption!`,
200201 Name : "freezer-migrate" ,
201202 Usage : "Migrate legacy parts of the freezer. (WARNING: may take a long time)" ,
202203 ArgsUsage : "" ,
203- Flags : utils . GroupFlags ([]cli.Flag {
204+ Flags : flags . Merge ([]cli.Flag {
204205 utils .SyncModeFlag ,
205206 }, utils .NetworkFlags , utils .DatabasePathFlags ),
206207 Description : `The freezer-migrate command checks your database for receipts in a legacy format and updates those.
0 commit comments