aboutsummaryrefslogtreecommitdiffstats
path: root/eth
diff options
context:
space:
mode:
authorzelig <viktor.tron@gmail.com>2015-06-23 22:48:33 +0800
committerJeffrey Wilcke <geffobscura@gmail.com>2015-07-07 16:43:31 +0800
commit83ee39448e0f23d42dff27bccde27f828afa3707 (patch)
tree429fa8f20a4bc017a58ffc4c7c0ed8596d1d206f /eth
parentd764bd058457cd9eb91d205d1ac187d40c4866d6 (diff)
downloaddexon-83ee39448e0f23d42dff27bccde27f828afa3707.tar.gz
dexon-83ee39448e0f23d42dff27bccde27f828afa3707.tar.zst
dexon-83ee39448e0f23d42dff27bccde27f828afa3707.zip
Registrar and contractInfo handling
* resolver -> common/registrar * global registrar name registry interface * add Call to resolver backend interface * the hashReg and UrlHing contracts now initialised from global registry * initialization of contracts uniform * improve errors and more econsistent method names * common/registrar/ethreg: versioned registrar * integrate new naming and registrar in natspec * js console api: setGlobalRegistrar, setHashReg, setUrlHint * js test TestContract uses mining - tests fixed all pass * eth/backend: allow PoW test mode (small ethash DAG) * console jsre refers to resolver.abi/addr, * cmd/geth/contracts.go moved to common/registrar
Diffstat (limited to 'eth')
-rw-r--r--eth/backend.go13
1 files changed, 12 insertions, 1 deletions
diff --git a/eth/backend.go b/eth/backend.go
index e62252b6c..38e06bcf8 100644
--- a/eth/backend.go
+++ b/eth/backend.go
@@ -70,6 +70,7 @@ type Config struct {
VmDebug bool
NatSpec bool
AutoDAG bool
+ PowTest bool
MaxPeers int
MaxPendingPeers int
@@ -221,6 +222,7 @@ type Ethereum struct {
NatSpec bool
DataDir string
AutoDAG bool
+ PowTest bool
autodagquit chan bool
etherbase common.Address
clientVersion string
@@ -329,6 +331,7 @@ func New(config *Config) (*Ethereum, error) {
MinerThreads: config.MinerThreads,
SolcPath: config.SolcPath,
AutoDAG: config.AutoDAG,
+ PowTest: config.PowTest,
GpoMinGasPrice: config.GpoMinGasPrice,
GpoMaxGasPrice: config.GpoMaxGasPrice,
GpoFullBlockRatio: config.GpoFullBlockRatio,
@@ -337,7 +340,15 @@ func New(config *Config) (*Ethereum, error) {
GpobaseCorrectionFactor: config.GpobaseCorrectionFactor,
}
- eth.pow = ethash.New()
+ if config.PowTest {
+ glog.V(logger.Info).Infof("ethash used in test mode")
+ eth.pow, err = ethash.NewForTesting()
+ if err != nil {
+ return nil, err
+ }
+ } else {
+ eth.pow = ethash.New()
+ }
genesis := core.GenesisBlock(uint64(config.GenesisNonce), stateDb)
eth.chainManager, err = core.NewChainManager(genesis, blockDb, stateDb, extraDb, eth.pow, eth.EventMux())
if err != nil {