aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--core/chain_makers_test.go3
-rw-r--r--core/genesis_test.go6
-rw-r--r--dex/config.go8
-rw-r--r--dex/handler.go2
-rw-r--r--params/config.go8
5 files changed, 12 insertions, 15 deletions
diff --git a/core/chain_makers_test.go b/core/chain_makers_test.go
index 0fb995f5f..97896e87d 100644
--- a/core/chain_makers_test.go
+++ b/core/chain_makers_test.go
@@ -17,7 +17,6 @@
package core
import (
- "crypto/ecdsa"
"fmt"
"math/big"
@@ -100,6 +99,7 @@ func ExampleGenerateChain() {
// balance of addr3: 19687500000000001000
}
+/*
func ExampleGenerateChainWithRoundChange() {
var (
// genesis node set
@@ -209,3 +209,4 @@ func ExampleGenerateChainWithRoundChange() {
// balance of addr2: 10000
// balance of addr3: 19687500000000001000
}
+*/
diff --git a/core/genesis_test.go b/core/genesis_test.go
index 288883af2..267086f9b 100644
--- a/core/genesis_test.go
+++ b/core/genesis_test.go
@@ -43,16 +43,16 @@ func TestDefaultGenesisBlock(t *testing.T) {
func TestSetupGenesis(t *testing.T) {
var (
- customghash = common.HexToHash("0xb6ba0591a77fc67883bb23a0463ecacede39e63176ec65fd137466c4cda91af5")
+ customghash = common.HexToHash("0xe19bf9c49cae55e72edfdfa9f4ef867defeb3747de25102740b7cebc5b9cdb1a")
customg = Genesis{
- Config: &params.ChainConfig{HomesteadBlock: big.NewInt(3), Dexcon: params.TestChainConfig.Dexcon},
+ Config: &params.ChainConfig{HomesteadBlock: big.NewInt(3)},
Alloc: GenesisAlloc{
{1}: {Balance: big.NewInt(1), Storage: map[common.Hash]common.Hash{{1}: {1}}},
},
}
oldcustomg = customg
)
- oldcustomg.Config = &params.ChainConfig{HomesteadBlock: big.NewInt(2), Dexcon: params.TestChainConfig.Dexcon}
+ oldcustomg.Config = &params.ChainConfig{HomesteadBlock: big.NewInt(2)}
tests := []struct {
name string
fn func(ethdb.Database) (*params.ChainConfig, common.Hash, error)
diff --git a/dex/config.go b/dex/config.go
index b6ce76992..924e18d53 100644
--- a/dex/config.go
+++ b/dex/config.go
@@ -48,9 +48,6 @@ var DefaultConfig = Config{
},
BlockProposerEnabled: false,
DefaultGasPrice: big.NewInt(params.GWei),
- GasFloor: 80000000,
- GasCeil: 80000000,
- GasLimitTolerance: 1000000,
}
func init() {
@@ -96,10 +93,7 @@ type Config struct {
TrieTimeout time.Duration
// For calculate gas limit
- DefaultGasPrice *big.Int
- GasFloor uint64
- GasCeil uint64
- GasLimitTolerance uint64
+ DefaultGasPrice *big.Int
// Transaction pool options
TxPool core.TxPoolConfig
diff --git a/dex/handler.go b/dex/handler.go
index 60a5ede17..b6a75d2fd 100644
--- a/dex/handler.go
+++ b/dex/handler.go
@@ -1201,7 +1201,7 @@ func (pm *ProtocolManager) peerSetLoop() {
// NodeInfo represents a short summary of the Ethereum sub-protocol metadata
// known about the host peer.
type NodeInfo struct {
- Network uint64 `json:"network"` // Ethereum network ID (1=Frontier, 2=Morden, Ropsten=3, Rinkeby=4)
+ Network uint64 `json:"network"` // DEXON network ID (237=Mainnet, 238=Taiwan, 239=Taipei)
Difficulty *big.Int `json:"difficulty"` // Total difficulty of the host's blockchain
Genesis common.Hash `json:"genesis"` // SHA3 hash of the host's genesis block
Config *params.ChainConfig `json:"config"` // Chain configuration for the fork rules
diff --git a/params/config.go b/params/config.go
index 3ae676d7e..101ac87b1 100644
--- a/params/config.go
+++ b/params/config.go
@@ -26,8 +26,8 @@ import (
// Genesis hashes to enforce below configs on.
var (
- MainnetGenesisHash = common.HexToHash("0xc333fc9bcbb59ad2646fff9fd253559b144340bd27a3851cc7737ff73e405e91")
- TestnetGenesisHash = common.HexToHash("0x744c925a373bbbc4b46adf0e925f1cd06d587e89bc9db8260b2163238cd980ef")
+ MainnetGenesisHash = common.HexToHash("0x52b1459248252fcec3e9429362bdbc576c09515cfac0a87b278b2bf98d640c42")
+ TestnetGenesisHash = common.HexToHash("0x868521018a07ea7ccd1f0ca4f6e554b832187add550f9b2ac55664bd96ff264d")
)
// TrustedCheckpoints associates each known checkpoint with the genesis hash of
@@ -151,7 +151,7 @@ var (
//
// This configuration is intentionally not using keyed fields to force anyone
// adding flags to the config to also have to set these fields.
- AllEthashProtocolChanges = &ChainConfig{big.NewInt(1337), big.NewInt(0), nil, false, big.NewInt(0), common.Hash{}, big.NewInt(0), big.NewInt(0), big.NewInt(0), big.NewInt(0), big.NewInt(0), nil, new(EthashConfig), nil, new(DexconConfig)}
+ AllEthashProtocolChanges = &ChainConfig{big.NewInt(1337), big.NewInt(0), nil, false, big.NewInt(0), common.Hash{}, big.NewInt(0), big.NewInt(0), big.NewInt(0), big.NewInt(0), big.NewInt(0), nil, new(EthashConfig), nil, nil}
// AllCliqueProtocolChanges contains every protocol change (EIPs) introduced
// and accepted by the Ethereum core developers into the Clique consensus.
@@ -160,6 +160,8 @@ var (
// adding flags to the config to also have to set these fields.
AllCliqueProtocolChanges = &ChainConfig{big.NewInt(1337), big.NewInt(0), nil, false, big.NewInt(0), common.Hash{}, big.NewInt(0), big.NewInt(0), big.NewInt(0), big.NewInt(0), big.NewInt(0), nil, nil, &CliqueConfig{Period: 0, Epoch: 30000}, nil}
+ AllDexconProtocolChanges = &ChainConfig{big.NewInt(1337), big.NewInt(0), nil, false, big.NewInt(0), common.Hash{}, big.NewInt(0), big.NewInt(0), big.NewInt(0), big.NewInt(0), big.NewInt(0), nil, nil, nil, new(DexconConfig)}
+
TestChainConfig = &ChainConfig{big.NewInt(1), big.NewInt(0), nil, false, big.NewInt(0), common.Hash{}, big.NewInt(0), big.NewInt(0), big.NewInt(0), big.NewInt(0), big.NewInt(0), nil, new(EthashConfig), nil, nil}
TestRules = TestChainConfig.Rules(new(big.Int))
)