diff options
author | Jeffrey Wilcke <jeffrey@ethereum.org> | 2015-05-09 19:13:16 +0800 |
---|---|---|
committer | Jeffrey Wilcke <jeffrey@ethereum.org> | 2015-05-09 19:13:16 +0800 |
commit | e289b0a1c12868267dac89287a0e36b7f89b67f6 (patch) | |
tree | 79b2afae15c44422fa903251a8872f91324c48a0 /eth | |
parent | c8fc4cebe63073fd77d5f553a4f0cec36a4ccb4b (diff) | |
parent | 658ac3c257e0d97c44cf7924c84c050032256d61 (diff) | |
download | go-tangerine-e289b0a1c12868267dac89287a0e36b7f89b67f6.tar go-tangerine-e289b0a1c12868267dac89287a0e36b7f89b67f6.tar.gz go-tangerine-e289b0a1c12868267dac89287a0e36b7f89b67f6.tar.bz2 go-tangerine-e289b0a1c12868267dac89287a0e36b7f89b67f6.tar.lz go-tangerine-e289b0a1c12868267dac89287a0e36b7f89b67f6.tar.xz go-tangerine-e289b0a1c12868267dac89287a0e36b7f89b67f6.tar.zst go-tangerine-e289b0a1c12868267dac89287a0e36b7f89b67f6.zip |
Merge pull request #888 from obscuren/developv0.9.18
miner, flags: Configurable gas price & log flag change
Diffstat (limited to 'eth')
-rw-r--r-- | eth/backend.go | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/eth/backend.go b/eth/backend.go index 0f23cde2f..8f0789467 100644 --- a/eth/backend.go +++ b/eth/backend.go @@ -5,6 +5,7 @@ import ( "encoding/json" "fmt" "io/ioutil" + "math/big" "os" "path" "path/filepath" @@ -53,12 +54,12 @@ type Config struct { BlockChainVersion int SkipBcVersionCheck bool // e.g. blockchain export - DataDir string - LogFile string - LogLevel int - LogJSON string - VmDebug bool - NatSpec bool + DataDir string + LogFile string + Verbosity int + LogJSON string + VmDebug bool + NatSpec bool MaxPeers int MaxPendingPeers int @@ -76,6 +77,7 @@ type Config struct { Dial bool Etherbase string + GasPrice *big.Int MinerThreads int AccountManager *accounts.Manager @@ -200,7 +202,7 @@ type Ethereum struct { func New(config *Config) (*Ethereum, error) { // Bootstrap database - logger.New(config.DataDir, config.LogFile, config.LogLevel) + logger.New(config.DataDir, config.LogFile, config.Verbosity) if len(config.LogJSON) > 0 { logger.NewJSONsystem(config.DataDir, config.LogJSON) } @@ -266,6 +268,8 @@ func New(config *Config) (*Ethereum, error) { eth.blockProcessor = core.NewBlockProcessor(stateDb, extraDb, eth.pow, eth.txPool, eth.chainManager, eth.EventMux()) eth.chainManager.SetProcessor(eth.blockProcessor) eth.miner = miner.New(eth, eth.pow, config.MinerThreads) + eth.miner.SetGasPrice(config.GasPrice) + eth.protocolManager = NewProtocolManager(config.ProtocolVersion, config.NetworkId, eth.eventMux, eth.txPool, eth.chainManager, eth.downloader) if config.Shh { eth.whisper = whisper.New() |