@@ -163,10 +163,6 @@ var (
163163 }
164164 // Miner settings
165165 // 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- }
170166 MiningEnabledFlag = cli.BoolFlag {
171167 Name : "mine" ,
172168 Usage : "Enable mining" ,
@@ -185,6 +181,10 @@ var (
185181 Usage : "Target gas limit sets the artificial target gas floor for the blocks to mine" ,
186182 Value : params .GenesisGasLimit .String (),
187183 }
184+ DAOSoftForkFlag = cli.BoolFlag {
185+ Name : "dao-soft-fork" ,
186+ Usage : "Vote for the DAO soft-fork, temporarilly decreasing the gas limits" ,
187+ }
188188 AutoDAGFlag = cli.BoolFlag {
189189 Name : "autodag" ,
190190 Usage : "Enable automatic DAG pregeneration" ,
@@ -644,16 +644,6 @@ func MakePasswordList(ctx *cli.Context) []string {
644644 return lines
645645}
646646
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-
657647// MakeSystemNode sets up a local node, configures the services to launch and
658648// assembles the P2P protocol stack.
659649func 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,
690680 }
691681 // Configure the Ethereum service
692682 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 )
695686
696687 // initialise new random number generator
697688 rand := rand .New (rand .NewSource (time .Now ().UnixNano ()))
0 commit comments