@@ -26,6 +26,7 @@ type Settings struct {
2626 ReportPath string `json:"reportPath,omitempty"`
2727 TxsDir string `json:"txsDir,omitempty"`
2828 TargetGas uint64 `json:"targetGas,omitempty"`
29+ NumBlocksToWrite int `json:"numBlocksToWrite,omitempty"`
2930}
3031
3132// DefaultSettings returns the default configuration values
@@ -45,6 +46,7 @@ func DefaultSettings() Settings {
4546 ReportPath : "" ,
4647 TxsDir : "" ,
4748 TargetGas : 10_000_000 ,
49+ NumBlocksToWrite : 100 ,
4850 }
4951}
5052
@@ -66,6 +68,7 @@ func InitializeViper(cmd *cobra.Command) error {
6668 "reportPath" : "report-path" ,
6769 "txsDir" : "txs-dir" ,
6870 "targetGas" : "target-gas" ,
71+ "numBlocksToWrite" : "num-blocks-to-write" ,
6972 }
7073
7174 for viperKey , flagName := range flagBindings {
@@ -90,6 +93,7 @@ func InitializeViper(cmd *cobra.Command) error {
9093 viper .SetDefault ("reportPath" , defaults .ReportPath )
9194 viper .SetDefault ("txsDir" , defaults .TxsDir )
9295 viper .SetDefault ("targetGas" , defaults .TargetGas )
96+ viper .SetDefault ("numBlocksToWrite" , defaults .NumBlocksToWrite )
9397 return nil
9498}
9599
@@ -130,5 +134,6 @@ func ResolveSettings() Settings {
130134 ReportPath : viper .GetString ("reportPath" ),
131135 TxsDir : viper .GetString ("txsDir" ),
132136 TargetGas : viper .GetUint64 ("targetGas" ),
137+ NumBlocksToWrite : viper .GetInt ("numBlocksToWrite" ),
133138 }
134139}
0 commit comments