@@ -22,6 +22,7 @@ import (
22
22
"os"
23
23
"os/signal"
24
24
"path/filepath"
25
+ "slices"
25
26
"strconv"
26
27
"strings"
27
28
"syscall"
@@ -36,7 +37,6 @@ import (
36
37
"github.com/ethereum/go-ethereum/core/types"
37
38
"github.com/ethereum/go-ethereum/crypto"
38
39
"github.com/ethereum/go-ethereum/ethdb"
39
- "github.com/ethereum/go-ethereum/internal/flags"
40
40
"github.com/ethereum/go-ethereum/log"
41
41
"github.com/ethereum/go-ethereum/rlp"
42
42
"github.com/ethereum/go-ethereum/trie"
60
60
Name : "removedb" ,
61
61
Usage : "Remove blockchain and state databases" ,
62
62
ArgsUsage : "" ,
63
- Flags : flags . Merge (utils .DatabaseFlags ,
63
+ Flags : slices . Concat (utils .DatabaseFlags ,
64
64
[]cli.Flag {removeStateDataFlag , removeChainDataFlag }),
65
65
Description : `
66
66
Remove blockchain and state databases` ,
@@ -89,7 +89,7 @@ Remove blockchain and state databases`,
89
89
Action : inspect ,
90
90
Name : "inspect" ,
91
91
ArgsUsage : "<prefix> <start>" ,
92
- Flags : flags . Merge ([]cli.Flag {
92
+ Flags : slices . Concat ([]cli.Flag {
93
93
utils .SyncModeFlag ,
94
94
}, utils .NetworkFlags , utils .DatabaseFlags ),
95
95
Usage : "Inspect the storage size for each type of data in the database" ,
@@ -99,7 +99,7 @@ Remove blockchain and state databases`,
99
99
Action : checkStateContent ,
100
100
Name : "check-state-content" ,
101
101
ArgsUsage : "<start (optional)>" ,
102
- Flags : flags . Merge (utils .NetworkFlags , utils .DatabaseFlags ),
102
+ Flags : slices . Concat (utils .NetworkFlags , utils .DatabaseFlags ),
103
103
Usage : "Verify that state data is cryptographically correct" ,
104
104
Description : `This command iterates the entire database for 32-byte keys, looking for rlp-encoded trie nodes.
105
105
For each trie node encountered, it checks that the key corresponds to the keccak256(value). If this is not true, this indicates
@@ -109,15 +109,15 @@ a data corruption.`,
109
109
Action : dbStats ,
110
110
Name : "stats" ,
111
111
Usage : "Print leveldb statistics" ,
112
- Flags : flags . Merge ([]cli.Flag {
112
+ Flags : slices . Concat ([]cli.Flag {
113
113
utils .SyncModeFlag ,
114
114
}, utils .NetworkFlags , utils .DatabaseFlags ),
115
115
}
116
116
dbCompactCmd = & cli.Command {
117
117
Action : dbCompact ,
118
118
Name : "compact" ,
119
119
Usage : "Compact leveldb database. WARNING: May take a very long time" ,
120
- Flags : flags . Merge ([]cli.Flag {
120
+ Flags : slices . Concat ([]cli.Flag {
121
121
utils .SyncModeFlag ,
122
122
utils .CacheFlag ,
123
123
utils .CacheDatabaseFlag ,
@@ -131,7 +131,7 @@ corruption if it is aborted during execution'!`,
131
131
Name : "get" ,
132
132
Usage : "Show the value of a database key" ,
133
133
ArgsUsage : "<hex-encoded key>" ,
134
- Flags : flags . Merge ([]cli.Flag {
134
+ Flags : slices . Concat ([]cli.Flag {
135
135
utils .SyncModeFlag ,
136
136
}, utils .NetworkFlags , utils .DatabaseFlags ),
137
137
Description : "This command looks up the specified database key from the database." ,
@@ -141,7 +141,7 @@ corruption if it is aborted during execution'!`,
141
141
Name : "delete" ,
142
142
Usage : "Delete a database key (WARNING: may corrupt your database)" ,
143
143
ArgsUsage : "<hex-encoded key>" ,
144
- Flags : flags . Merge ([]cli.Flag {
144
+ Flags : slices . Concat ([]cli.Flag {
145
145
utils .SyncModeFlag ,
146
146
}, utils .NetworkFlags , utils .DatabaseFlags ),
147
147
Description : `This command deletes the specified database key from the database.
@@ -152,7 +152,7 @@ WARNING: This is a low-level operation which may cause database corruption!`,
152
152
Name : "put" ,
153
153
Usage : "Set the value of a database key (WARNING: may corrupt your database)" ,
154
154
ArgsUsage : "<hex-encoded key> <hex-encoded value>" ,
155
- Flags : flags . Merge ([]cli.Flag {
155
+ Flags : slices . Concat ([]cli.Flag {
156
156
utils .SyncModeFlag ,
157
157
}, utils .NetworkFlags , utils .DatabaseFlags ),
158
158
Description : `This command sets a given database key to the given value.
@@ -163,7 +163,7 @@ WARNING: This is a low-level operation which may cause database corruption!`,
163
163
Name : "dumptrie" ,
164
164
Usage : "Show the storage key/values of a given storage trie" ,
165
165
ArgsUsage : "<hex-encoded state root> <hex-encoded account hash> <hex-encoded storage trie root> <hex-encoded start (optional)> <int max elements (optional)>" ,
166
- Flags : flags . Merge ([]cli.Flag {
166
+ Flags : slices . Concat ([]cli.Flag {
167
167
utils .SyncModeFlag ,
168
168
}, utils .NetworkFlags , utils .DatabaseFlags ),
169
169
Description : "This command looks up the specified database key from the database." ,
@@ -173,7 +173,7 @@ WARNING: This is a low-level operation which may cause database corruption!`,
173
173
Name : "freezer-index" ,
174
174
Usage : "Dump out the index of a specific freezer table" ,
175
175
ArgsUsage : "<freezer-type> <table-type> <start (int)> <end (int)>" ,
176
- Flags : flags . Merge ([]cli.Flag {
176
+ Flags : slices . Concat ([]cli.Flag {
177
177
utils .SyncModeFlag ,
178
178
}, utils .NetworkFlags , utils .DatabaseFlags ),
179
179
Description : "This command displays information about the freezer index." ,
@@ -183,7 +183,7 @@ WARNING: This is a low-level operation which may cause database corruption!`,
183
183
Name : "import" ,
184
184
Usage : "Imports leveldb-data from an exported RLP dump." ,
185
185
ArgsUsage : "<dumpfile> <start (optional)" ,
186
- Flags : flags . Merge ([]cli.Flag {
186
+ Flags : slices . Concat ([]cli.Flag {
187
187
utils .SyncModeFlag ,
188
188
}, utils .NetworkFlags , utils .DatabaseFlags ),
189
189
Description : "The import command imports the specific chain data from an RLP encoded stream." ,
@@ -193,7 +193,7 @@ WARNING: This is a low-level operation which may cause database corruption!`,
193
193
Name : "export" ,
194
194
Usage : "Exports the chain data into an RLP dump. If the <dumpfile> has .gz suffix, gzip compression will be used." ,
195
195
ArgsUsage : "<type> <dumpfile>" ,
196
- Flags : flags . Merge ([]cli.Flag {
196
+ Flags : slices . Concat ([]cli.Flag {
197
197
utils .SyncModeFlag ,
198
198
}, utils .NetworkFlags , utils .DatabaseFlags ),
199
199
Description : "Exports the specified chain data to an RLP encoded stream, optionally gzip-compressed." ,
@@ -202,7 +202,7 @@ WARNING: This is a low-level operation which may cause database corruption!`,
202
202
Action : showMetaData ,
203
203
Name : "metadata" ,
204
204
Usage : "Shows metadata about the chain status." ,
205
- Flags : flags . Merge ([]cli.Flag {
205
+ Flags : slices . Concat ([]cli.Flag {
206
206
utils .SyncModeFlag ,
207
207
}, utils .NetworkFlags , utils .DatabaseFlags ),
208
208
Description : "Shows metadata about the chain status." ,
@@ -212,7 +212,7 @@ WARNING: This is a low-level operation which may cause database corruption!`,
212
212
Name : "inspect-history" ,
213
213
Usage : "Inspect the state history within block range" ,
214
214
ArgsUsage : "<address> [OPTIONAL <storage-slot>]" ,
215
- Flags : flags . Merge ([]cli.Flag {
215
+ Flags : slices . Concat ([]cli.Flag {
216
216
utils .SyncModeFlag ,
217
217
& cli.Uint64Flag {
218
218
Name : "start" ,
0 commit comments