@@ -163,10 +163,6 @@ var (
163
163
}
164
164
// Miner settings
165
165
// TODO: refactor CPU vs GPU mining flags
166
- BlockedCodeHashesFlag = cli.StringFlag {
167
- Name : "blocked-code-hashes" ,
168
- Usage : "Comma separated list of code-hashes to ignore any interaction from" ,
169
- }
170
166
MiningEnabledFlag = cli.BoolFlag {
171
167
Name : "mine" ,
172
168
Usage : "Enable mining" ,
@@ -185,6 +181,10 @@ var (
185
181
Usage : "Target gas limit sets the artificial target gas floor for the blocks to mine" ,
186
182
Value : params .GenesisGasLimit .String (),
187
183
}
184
+ DAOSoftForkFlag = cli.BoolFlag {
185
+ Name : "dao-soft-fork" ,
186
+ Usage : "Vote for the DAO soft-fork, temporarilly decreasing the gas limits" ,
187
+ }
188
188
AutoDAGFlag = cli.BoolFlag {
189
189
Name : "autodag" ,
190
190
Usage : "Enable automatic DAG pregeneration" ,
@@ -644,16 +644,6 @@ func MakePasswordList(ctx *cli.Context) []string {
644
644
return lines
645
645
}
646
646
647
- // MakeBlockedCodeHashes parses a comma separated list of hashes.
648
- func MakeBlockedCodeHashes (ctx * cli.Context ) map [common.Hash ]struct {} {
649
- splittedHexHashes := strings .Split (ctx .GlobalString (BlockedCodeHashesFlag .Name ), "," )
650
- illegalCodeHashes := make (map [common.Hash ]struct {})
651
- for _ , hexHash := range splittedHexHashes {
652
- illegalCodeHashes [common .HexToHash (strings .TrimSpace (hexHash ))] = struct {}{}
653
- }
654
- return illegalCodeHashes
655
- }
656
-
657
647
// MakeSystemNode sets up a local node, configures the services to launch and
658
648
// assembles the P2P protocol stack.
659
649
func MakeSystemNode (name , version string , relconf release.Config , extra []byte , ctx * cli.Context ) * node.Node {
@@ -690,8 +680,9 @@ func MakeSystemNode(name, version string, relconf release.Config, extra []byte,
690
680
}
691
681
// Configure the Ethereum service
692
682
accman := MakeAccountManager (ctx )
693
- // parse the blocked code hashes and set them to the core package.
694
- core .BlockedCodeHashes = MakeBlockedCodeHashes (ctx )
683
+
684
+ // Handle some miner strategies arrising from the DAO fiasco
685
+ core .DAOSoftFork = ctx .GlobalBool (DAOSoftForkFlag .Name )
695
686
696
687
// initialise new random number generator
697
688
rand := rand .New (rand .NewSource (time .Now ().UnixNano ()))
0 commit comments