@@ -37,6 +37,7 @@ import (
37
37
"github.com/ethereum/go-ethereum/core/types"
38
38
"github.com/ethereum/go-ethereum/crypto"
39
39
"github.com/ethereum/go-ethereum/ethdb"
40
+ "github.com/ethereum/go-ethereum/internal/flags"
40
41
"github.com/ethereum/go-ethereum/log"
41
42
"github.com/ethereum/go-ethereum/trie"
42
43
"github.com/olekukonko/tablewriter"
@@ -77,7 +78,7 @@ Remove blockchain and state databases`,
77
78
Action : inspect ,
78
79
Name : "inspect" ,
79
80
ArgsUsage : "<prefix> <start>" ,
80
- Flags : utils . GroupFlags ([]cli.Flag {
81
+ Flags : flags . Merge ([]cli.Flag {
81
82
utils .SyncModeFlag ,
82
83
}, utils .NetworkFlags , utils .DatabasePathFlags ),
83
84
Usage : "Inspect the storage size for each type of data in the database" ,
@@ -87,7 +88,7 @@ Remove blockchain and state databases`,
87
88
Action : checkStateContent ,
88
89
Name : "check-state-content" ,
89
90
ArgsUsage : "<start (optional)>" ,
90
- Flags : utils . GroupFlags (utils .NetworkFlags , utils .DatabasePathFlags ),
91
+ Flags : flags . Merge (utils .NetworkFlags , utils .DatabasePathFlags ),
91
92
Usage : "Verify that state data is cryptographically correct" ,
92
93
Description : `This command iterates the entire database for 32-byte keys, looking for rlp-encoded trie nodes.
93
94
For 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.`,
97
98
Action : dbStats ,
98
99
Name : "stats" ,
99
100
Usage : "Print leveldb statistics" ,
100
- Flags : utils . GroupFlags ([]cli.Flag {
101
+ Flags : flags . Merge ([]cli.Flag {
101
102
utils .SyncModeFlag ,
102
103
}, utils .NetworkFlags , utils .DatabasePathFlags ),
103
104
}
104
105
dbCompactCmd = & cli.Command {
105
106
Action : dbCompact ,
106
107
Name : "compact" ,
107
108
Usage : "Compact leveldb database. WARNING: May take a very long time" ,
108
- Flags : utils . GroupFlags ([]cli.Flag {
109
+ Flags : flags . Merge ([]cli.Flag {
109
110
utils .SyncModeFlag ,
110
111
utils .CacheFlag ,
111
112
utils .CacheDatabaseFlag ,
@@ -119,7 +120,7 @@ corruption if it is aborted during execution'!`,
119
120
Name : "get" ,
120
121
Usage : "Show the value of a database key" ,
121
122
ArgsUsage : "<hex-encoded key>" ,
122
- Flags : utils . GroupFlags ([]cli.Flag {
123
+ Flags : flags . Merge ([]cli.Flag {
123
124
utils .SyncModeFlag ,
124
125
}, utils .NetworkFlags , utils .DatabasePathFlags ),
125
126
Description : "This command looks up the specified database key from the database." ,
@@ -129,7 +130,7 @@ corruption if it is aborted during execution'!`,
129
130
Name : "delete" ,
130
131
Usage : "Delete a database key (WARNING: may corrupt your database)" ,
131
132
ArgsUsage : "<hex-encoded key>" ,
132
- Flags : utils . GroupFlags ([]cli.Flag {
133
+ Flags : flags . Merge ([]cli.Flag {
133
134
utils .SyncModeFlag ,
134
135
}, utils .NetworkFlags , utils .DatabasePathFlags ),
135
136
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!`,
140
141
Name : "put" ,
141
142
Usage : "Set the value of a database key (WARNING: may corrupt your database)" ,
142
143
ArgsUsage : "<hex-encoded key> <hex-encoded value>" ,
143
- Flags : utils . GroupFlags ([]cli.Flag {
144
+ Flags : flags . Merge ([]cli.Flag {
144
145
utils .SyncModeFlag ,
145
146
}, utils .NetworkFlags , utils .DatabasePathFlags ),
146
147
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!`,
151
152
Name : "dumptrie" ,
152
153
Usage : "Show the storage key/values of a given storage trie" ,
153
154
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 {
155
156
utils .SyncModeFlag ,
156
157
}, utils .NetworkFlags , utils .DatabasePathFlags ),
157
158
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!`,
161
162
Name : "freezer-index" ,
162
163
Usage : "Dump out the index of a given freezer type" ,
163
164
ArgsUsage : "<type> <start (int)> <end (int)>" ,
164
- Flags : utils . GroupFlags ([]cli.Flag {
165
+ Flags : flags . Merge ([]cli.Flag {
165
166
utils .SyncModeFlag ,
166
167
}, utils .NetworkFlags , utils .DatabasePathFlags ),
167
168
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!`,
171
172
Name : "import" ,
172
173
Usage : "Imports leveldb-data from an exported RLP dump." ,
173
174
ArgsUsage : "<dumpfile> <start (optional)" ,
174
- Flags : utils . GroupFlags ([]cli.Flag {
175
+ Flags : flags . Merge ([]cli.Flag {
175
176
utils .SyncModeFlag ,
176
177
}, utils .NetworkFlags , utils .DatabasePathFlags ),
177
178
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!`,
181
182
Name : "export" ,
182
183
Usage : "Exports the chain data into an RLP dump. If the <dumpfile> has .gz suffix, gzip compression will be used." ,
183
184
ArgsUsage : "<type> <dumpfile>" ,
184
- Flags : utils . GroupFlags ([]cli.Flag {
185
+ Flags : flags . Merge ([]cli.Flag {
185
186
utils .SyncModeFlag ,
186
187
}, utils .NetworkFlags , utils .DatabasePathFlags ),
187
188
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!`,
190
191
Action : showMetaData ,
191
192
Name : "metadata" ,
192
193
Usage : "Shows metadata about the chain status." ,
193
- Flags : utils . GroupFlags ([]cli.Flag {
194
+ Flags : flags . Merge ([]cli.Flag {
194
195
utils .SyncModeFlag ,
195
196
}, utils .NetworkFlags , utils .DatabasePathFlags ),
196
197
Description : "Shows metadata about the chain status." ,
@@ -200,7 +201,7 @@ WARNING: This is a low-level operation which may cause database corruption!`,
200
201
Name : "freezer-migrate" ,
201
202
Usage : "Migrate legacy parts of the freezer. (WARNING: may take a long time)" ,
202
203
ArgsUsage : "" ,
203
- Flags : utils . GroupFlags ([]cli.Flag {
204
+ Flags : flags . Merge ([]cli.Flag {
204
205
utils .SyncModeFlag ,
205
206
}, utils .NetworkFlags , utils .DatabasePathFlags ),
206
207
Description : `The freezer-migrate command checks your database for receipts in a legacy format and updates those.
0 commit comments