aboutsummaryrefslogtreecommitdiffstats
path: root/cmd/mist
diff options
context:
space:
mode:
authorJeffrey Wilcke <jeffrey@ethereum.org>2015-02-20 05:37:13 +0800
committerJeffrey Wilcke <jeffrey@ethereum.org>2015-02-20 05:37:13 +0800
commit765740b829072f9a1bbeff356377a91defd9fdd8 (patch)
tree825825563579746c5dc5d2f9d2f6d3da3fc96e78 /cmd/mist
parent07c34751da96e3daa023b028494ef1c86cf6d1fc (diff)
parent5aff8bfb5918e53ba2590b25e6c17e1875870f6a (diff)
downloadgo-tangerine-765740b829072f9a1bbeff356377a91defd9fdd8.tar.gz
go-tangerine-765740b829072f9a1bbeff356377a91defd9fdd8.tar.zst
go-tangerine-765740b829072f9a1bbeff356377a91defd9fdd8.zip
Merge pull request #345 from maran/feature/minerthreads
Implement command line argument to set the amount miner threads
Diffstat (limited to 'cmd/mist')
-rw-r--r--cmd/mist/flags.go3
-rw-r--r--cmd/mist/main.go27
2 files changed, 17 insertions, 13 deletions
diff --git a/cmd/mist/flags.go b/cmd/mist/flags.go
index eb280f71b..d9487de9e 100644
--- a/cmd/mist/flags.go
+++ b/cmd/mist/flags.go
@@ -63,6 +63,7 @@ var (
DebugFile string
LogLevel int
VmType int
+ MinerThreads int
)
// flags specific to gui client
@@ -137,6 +138,8 @@ func Init() {
flag.StringVar(&BootNodes, "bootnodes", "", "space-separated node URLs for discovery bootstrap")
flag.IntVar(&MaxPeer, "maxpeer", 30, "maximum desired peers")
+ flag.IntVar(&MinerThreads, "minerthreads", runtime.NumCPU(), "number of miner threads")
+
flag.Parse()
var err error
diff --git a/cmd/mist/main.go b/cmd/mist/main.go
index 14f561e99..d41aa34bf 100644
--- a/cmd/mist/main.go
+++ b/cmd/mist/main.go
@@ -52,19 +52,20 @@ func run() error {
config := utils.InitConfig(VmType, ConfigFile, Datadir, "ETH")
ethereum, err := eth.New(&eth.Config{
- Name: p2p.MakeName(ClientIdentifier, Version),
- KeyStore: KeyStore,
- DataDir: Datadir,
- LogFile: LogFile,
- LogLevel: LogLevel,
- MaxPeers: MaxPeer,
- Port: OutboundPort,
- NAT: NAT,
- Shh: true,
- BootNodes: BootNodes,
- NodeKey: NodeKey,
- KeyRing: KeyRing,
- Dial: true,
+ Name: p2p.MakeName(ClientIdentifier, Version),
+ KeyStore: KeyStore,
+ DataDir: Datadir,
+ LogFile: LogFile,
+ LogLevel: LogLevel,
+ MaxPeers: MaxPeer,
+ Port: OutboundPort,
+ NAT: NAT,
+ Shh: true,
+ BootNodes: BootNodes,
+ NodeKey: NodeKey,
+ KeyRing: KeyRing,
+ Dial: true,
+ MinerThreads: MinerThreads,
})
if err != nil {
mainlogger.Fatalln(err)