48
48
recheckHeadersArg bool
49
49
SubCommand string
50
50
LogWithCommand log.Entry
51
- stateDiffSource string
51
+ storageDiffsSource string
52
52
)
53
53
54
54
const (
@@ -81,6 +81,7 @@ func setViperConfigs() {
81
81
ipc = viper .GetString ("client.ipcpath" )
82
82
levelDbPath = viper .GetString ("client.leveldbpath" )
83
83
storageDiffsPath = viper .GetString ("filesystem.storageDiffsPath" )
84
+ storageDiffsSource = viper .GetString ("storageDiffs.source" )
84
85
databaseConfig = config.Database {
85
86
Name : viper .GetString ("database.name" ),
86
87
Hostname : viper .GetString ("database.hostname" ),
@@ -119,9 +120,9 @@ func init() {
119
120
rootCmd .PersistentFlags ().String ("client-ipcPath" , "" , "location of geth.ipc file" )
120
121
rootCmd .PersistentFlags ().String ("client-levelDbPath" , "" , "location of levelDb chaindata" )
121
122
rootCmd .PersistentFlags ().String ("filesystem-storageDiffsPath" , "" , "location of storage diffs csv file" )
123
+ rootCmd .PersistentFlags ().String ("storageDiffs-source" , "csv" , "where to get the state diffs: csv or geth" )
122
124
rootCmd .PersistentFlags ().String ("exporter-name" , "exporter" , "name of exporter plugin" )
123
125
rootCmd .PersistentFlags ().String ("log-level" , log .InfoLevel .String (), "Log level (trace, debug, info, warn, error, fatal, panic" )
124
- rootCmd .PersistentFlags ().StringVar (& stateDiffSource , "state-diff-source" , "csv" , "where to get the state diffs: csv or geth" )
125
126
126
127
viper .BindPFlag ("database.name" , rootCmd .PersistentFlags ().Lookup ("database-name" ))
127
128
viper .BindPFlag ("database.port" , rootCmd .PersistentFlags ().Lookup ("database-port" ))
@@ -131,6 +132,7 @@ func init() {
131
132
viper .BindPFlag ("client.ipcPath" , rootCmd .PersistentFlags ().Lookup ("client-ipcPath" ))
132
133
viper .BindPFlag ("client.levelDbPath" , rootCmd .PersistentFlags ().Lookup ("client-levelDbPath" ))
133
134
viper .BindPFlag ("filesystem.storageDiffsPath" , rootCmd .PersistentFlags ().Lookup ("filesystem-storageDiffsPath" ))
135
+ viper .BindPFlag ("storageDiffs.source" , rootCmd .PersistentFlags ().Lookup ("storageDiffs-source" ))
134
136
viper .BindPFlag ("exporter.fileName" , rootCmd .PersistentFlags ().Lookup ("exporter-name" ))
135
137
viper .BindPFlag ("log.level" , rootCmd .PersistentFlags ().Lookup ("log-level" ))
136
138
}
0 commit comments