Compare commits
22 Commits
Author | SHA1 | Date | |
---|---|---|---|
c8695209f6 | |||
9b95112a2d | |||
a602c57c8d | |||
f3228592f5 | |||
87b8254da1 | |||
20eab80189 | |||
810389c07a | |||
3badd3782b | |||
be2a264915 | |||
b81baf5423 | |||
64359c9417 | |||
5a3853f83f | |||
532d746036 | |||
c66e18b175 | |||
2d4bd3b3ad | |||
a96d6c68e2 | |||
504815091f | |||
4dd3e7fe35 | |||
4c614909ff | |||
b0a23c73cf | |||
922c1f8f9f | |||
fd27393df3 |
19
.travis.yml
19
.travis.yml
@ -59,10 +59,6 @@ matrix:
|
||||
env:
|
||||
- azure-osx
|
||||
- mobile
|
||||
cache:
|
||||
directories:
|
||||
- $HOME/.android.platforms
|
||||
- $HOME/.cocoapods
|
||||
script:
|
||||
- go run build/ci.go install
|
||||
- go run build/ci.go archive -type tar -signer OSX_SIGNING_KEY -upload gethstore/builds
|
||||
@ -71,21 +67,24 @@ matrix:
|
||||
- brew update
|
||||
- brew install android-sdk maven gpg
|
||||
- alias gpg="gpg2"
|
||||
- export ANDROID_HOME=/usr/local/opt/android-sdk
|
||||
|
||||
- mkdir -p $ANDROID_HOME/platforms
|
||||
- mv -f $HOME/.android.platforms $ANDROID_HOME/platforms
|
||||
- echo "y" | android update sdk --no-ui --filter platform
|
||||
- export ANDROID_HOME=/usr/local/opt/android-sdk
|
||||
- echo "y" | android update sdk --no-ui --filter `android list sdk | grep "SDK Platform Android" | grep -E 'API 15|API 19|API 24' | awk '{print $1}' | cut -d '-' -f 1 | tr '\n' ','`
|
||||
|
||||
- go run build/ci.go aar -signer ANDROID_SIGNING_KEY -deploy https://oss.sonatype.org -upload gethstore/builds
|
||||
- mv -f $ANDROID_HOME/platforms $HOME/.android.platforms
|
||||
|
||||
# Build the iOS framework and upload it to CocoaPods and Azure
|
||||
- gem uninstall cocoapods -a
|
||||
- gem install cocoapods --pre
|
||||
|
||||
- mv ~/.cocoapods/repos/master ~/.cocoapods/repos/master.bak
|
||||
- sed -i '.bak' 's/repo.join/!repo.join/g' $(dirname `gem which cocoapods`)/cocoapods/sources_manager.rb
|
||||
- if [ "$TRAVIS_PULL_REQUEST" = "false" ]; then git clone --depth=1 https://github.com/CocoaPods/Specs.git ~/.cocoapods/repos/master && pod setup --verbose; fi
|
||||
|
||||
- xctool -version
|
||||
- xcrun simctl list
|
||||
- travis_wait 30 go run build/ci.go xcode -signer IOS_SIGNING_KEY -deploy trunk -upload gethstore/builds
|
||||
|
||||
- go run build/ci.go xcode -signer IOS_SIGNING_KEY -deploy trunk -upload gethstore/builds
|
||||
|
||||
install:
|
||||
- go get golang.org/x/tools/cmd/cover
|
||||
|
14
Dockerfile
Normal file
14
Dockerfile
Normal file
@ -0,0 +1,14 @@
|
||||
FROM alpine:3.3
|
||||
|
||||
ADD . /go-ethereum
|
||||
RUN \
|
||||
apk add --update git go make gcc musl-dev && \
|
||||
(cd go-ethereum && make geth) && \
|
||||
cp go-ethereum/build/bin/geth /geth && \
|
||||
apk del git go make gcc musl-dev && \
|
||||
rm -rf /go-ethereum && rm -rf /var/cache/apk/*
|
||||
|
||||
EXPOSE 8545
|
||||
EXPOSE 30303
|
||||
|
||||
ENTRYPOINT ["/geth"]
|
27
README.md
27
README.md
@ -1,28 +1,14 @@
|
||||
## Ethereum Go
|
||||
|
||||
Official golang implementation of the Ethereum protocol
|
||||
|
||||
| Linux | OSX | ARM | Windows | Tests
|
||||
----------|---------|-----|-----|---------|------
|
||||
develop | [](https://build.ethdev.com/builders/Linux%20Go%20develop%20branch/builds/-1) | [](https://build.ethdev.com/builders/OSX%20Go%20develop%20branch/builds/-1) | [](https://build.ethdev.com/builders/ARM%20Go%20develop%20branch/builds/-1) | [](https://build.ethdev.com/builders/Windows%20Go%20develop%20branch/builds/-1) | [](https://travis-ci.org/ethereum/go-ethereum) [](https://codecov.io/github/ethereum/go-ethereum?branch=develop)
|
||||
master | [](https://build.ethdev.com/builders/Linux%20Go%20master%20branch/builds/-1) | [](https://build.ethdev.com/builders/OSX%20Go%20master%20branch/builds/-1) | [](https://build.ethdev.com/builders/ARM%20Go%20master%20branch/builds/-1) | [](https://build.ethdev.com/builders/Windows%20Go%20master%20branch/builds/-1) | [](https://travis-ci.org/ethereum/go-ethereum) [](https://codecov.io/github/ethereum/go-ethereum?branch=master)
|
||||
Official golang implementation of the Ethereum protocol.
|
||||
|
||||
[](https://godoc.org/github.com/ethereum/go-ethereum)
|
||||
[](https://gitter.im/ethereum/go-ethereum?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge)
|
||||
|
||||
## Automated development builds
|
||||
|
||||
The following builds are built automatically by our build servers after each push to the [develop](https://github.com/ethereum/go-ethereum/tree/develop) branch.
|
||||
|
||||
* [Docker](https://registry.hub.docker.com/u/ethereum/client-go/)
|
||||
* [OS X](https://build.ethdev.com/builds/OSX%20Go%20develop%20branch/Mist-OSX-latest.dmg)
|
||||
* Ubuntu
|
||||
[trusty](https://build.ethdev.com/builds/Linux%20Go%20develop%20deb%20i386-trusty/latest/) |
|
||||
[utopic](https://build.ethdev.com/builds/Linux%20Go%20develop%20deb%20i386-utopic/latest/)
|
||||
* [Windows 64-bit](https://build.ethdev.com/builds/Windows%20Go%20develop%20branch/Geth-Win64-latest.zip)
|
||||
* [ARM](https://build.ethdev.com/builds/ARM%20Go%20develop%20branch/geth-ARM-latest.tar.bz2)
|
||||
Automated builds are available for stable releases and the unstable master branch.
|
||||
Binary archives are published at https://geth.ethereum.org/downloads/.
|
||||
|
||||
## Building the source
|
||||
|
||||
@ -46,13 +32,16 @@ The go-ethereum project comes with several wrappers/executables found in the `cm
|
||||
|
||||
| Command | Description |
|
||||
|:----------:|-------------|
|
||||
| **`geth`** | Our main Ethereum CLI client. It is the entry point into the Ethereum network (main-, test- or private net), capable of running as a full node (default) archive node (retaining all historical state) or a light node (retrieving data live). It can be used by other processes as a gateway into the Ethereum network via JSON RPC endpoints exposed on top of HTTP, WebSocket and/or IPC transports. Please see our [Command Line Options](https://github.com/ethereum/go-ethereum/wiki/Command-Line-Options) wiki page for details. |
|
||||
| **`geth`** | Our main Ethereum CLI client. It is the entry point into the Ethereum network (main-, test- or private net), capable of running as a full node (default) archive node (retaining all historical state) or a light node (retrieving data live). It can be used by other processes as a gateway into the Ethereum network via JSON RPC endpoints exposed on top of HTTP, WebSocket and/or IPC transports. `geth --help` and the [CLI Wiki page](https://github.com/ethereum/go-ethereum/wiki/Command-Line-Options) for command line options |
|
||||
| `abigen` | Source code generator to convert Ethereum contract definitions into easy to use, compile-time type-safe Go packages. It operates on plain [Ethereum contract ABIs](https://github.com/ethereum/wiki/wiki/Ethereum-Contract-ABI) with expanded functionality if the contract bytecode is also available. However it also accepts Solidity source files, making development much more streamlined. Please see our [Native DApps](https://github.com/ethereum/go-ethereum/wiki/Native-DApps:-Go-bindings-to-Ethereum-contracts) wiki page for details. |
|
||||
| `bootnode` | Stripped down version of our Ethereum client implementation that only takes part in the network node discovery protocol, but does not run any of the higher level application protocols. It can be used as a lightweight bootstrap node to aid in finding peers in private networks. |
|
||||
| `disasm` | Bytecode disassembler to convert EVM (Ethereum Virtual Machine) bytecode into more user friendly assembly-like opcodes (e.g. `echo "6001" | disasm`). For details on the individual opcodes, please see pages 22-30 of the [Ethereum Yellow Paper](http://gavwood.com/paper.pdf). |
|
||||
| `evm` | Developer utility version of the EVM (Ethereum Virtual Machine) that is capable of running bytecode snippets within a configurable environment and execution mode. Its purpose is to allow insolated, fine-grained debugging of EVM opcodes (e.g. `evm --code 60ff60ff --debug`). |
|
||||
| `gethrpctest` | Developer utility tool to support our [ethereum/rpc-test](https://github.com/ethereum/rpc-tests) test suite which validates baseline conformity to the [Ethereum JSON RPC](https://github.com/ethereum/wiki/wiki/JSON-RPC) specs. Please see the [test suite's readme](https://github.com/ethereum/rpc-tests/blob/master/README.md) for details. |
|
||||
| `rlpdump` | Developer utility tool to convert binary RLP ([Recursive Length Prefix](https://github.com/ethereum/wiki/wiki/RLP)) dumps (data encoding used by the Ethereum protocol both network as well as consensus wise) to user friendlier hierarchical representation (e.g. `rlpdump --hex CE0183FFFFFFC4C304050583616263`). |
|
||||
| `bzzd` | swarm daemon. This is the entrypoint for the swarm network. `bzzd --help` for command line options. See http://swarm-guide.readthedocs.io for swarm documentation. |
|
||||
| `bzzup` | swarm command line file uploader. `bzzup --help` for command line options |
|
||||
| `bzzhash` | command to calculate the swarm hash of a file or directory. `bzzhash --help` for command line options |
|
||||
|
||||
## Running geth
|
||||
|
||||
@ -273,7 +262,7 @@ Please make sure your contributions adhere to our coding guidelines:
|
||||
|
||||
* Code must adhere to the official Go [formatting](https://golang.org/doc/effective_go.html#formatting) guidelines (i.e. uses [gofmt](https://golang.org/cmd/gofmt/)).
|
||||
* Code must be documented adhering to the official Go [commentary](https://golang.org/doc/effective_go.html#commentary) guidelines.
|
||||
* Pull requests need to be based on and opened against the `develop` branch.
|
||||
* Pull requests need to be based on and opened against the `master` branch.
|
||||
* Commit messages should be prefixed with the package(s) they modify.
|
||||
* E.g. "eth, rpc: make trace configs optional"
|
||||
|
||||
|
@ -777,7 +777,6 @@ func doXCodeFramework(cmdline []string) {
|
||||
|
||||
// Build the iOS XCode framework
|
||||
build.MustRun(goTool("get", "golang.org/x/mobile/cmd/gomobile"))
|
||||
build.MustRun(gomobileTool("init"))
|
||||
|
||||
archive := "geth-" + archiveBasename("ios", env)
|
||||
if err := os.Mkdir(archive, os.ModePerm); err != nil {
|
||||
@ -799,7 +798,7 @@ func doXCodeFramework(cmdline []string) {
|
||||
if *deploy != "" {
|
||||
meta := newPodMetadata(env)
|
||||
build.Render("build/pod.podspec", meta.Name+".podspec", 0755, meta)
|
||||
build.MustRunCommand("pod", *deploy, "push", meta.Name+".podspec", "--allow-warnings")
|
||||
build.MustRunCommand("pod", *deploy, "push", meta.Name+".podspec", "--allow-warnings", "--verbose")
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -20,7 +20,8 @@ fi
|
||||
|
||||
# Set up the environment to use the workspace.
|
||||
GOPATH="$workspace"
|
||||
export GOPATH
|
||||
GO15VENDOREXPERIMENT=1
|
||||
export GOPATH GO15VENDOREXPERIMENT
|
||||
|
||||
# Run the command inside the workspace.
|
||||
cd "$ethdir/go-ethereum"
|
||||
|
@ -22,13 +22,11 @@ import (
|
||||
"io/ioutil"
|
||||
"math"
|
||||
"math/big"
|
||||
"math/rand"
|
||||
"os"
|
||||
"path/filepath"
|
||||
"runtime"
|
||||
"strconv"
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
"github.com/ethereum/ethash"
|
||||
"github.com/ethereum/go-ethereum/accounts"
|
||||
@ -717,16 +715,6 @@ func RegisterEthService(ctx *cli.Context, stack *node.Node, extra []byte) {
|
||||
Fatalf("The %v flags are mutually exclusive", netFlags)
|
||||
}
|
||||
|
||||
// initialise new random number generator
|
||||
rand := rand.New(rand.NewSource(time.Now().UnixNano()))
|
||||
// get enabled jit flag
|
||||
jitEnabled := ctx.GlobalBool(VMEnableJitFlag.Name)
|
||||
// if the jit is not enabled enable it for 10 pct of the people
|
||||
if !jitEnabled && rand.Float64() < 0.1 {
|
||||
jitEnabled = true
|
||||
glog.V(logger.Info).Infoln("You're one of the lucky few that will try out the JIT VM (random). If you get a consensus failure please be so kind to report this incident with the block hash that failed. You can switch to the regular VM by setting --jitvm=false")
|
||||
}
|
||||
|
||||
ethConf := ð.Config{
|
||||
Etherbase: MakeEtherbase(stack.AccountManager(), ctx),
|
||||
ChainConfig: MakeChainConfig(ctx, stack),
|
||||
@ -742,8 +730,6 @@ func RegisterEthService(ctx *cli.Context, stack *node.Node, extra []byte) {
|
||||
ExtraData: MakeMinerExtra(extra, ctx),
|
||||
NatSpec: ctx.GlobalBool(NatspecEnabledFlag.Name),
|
||||
DocRoot: ctx.GlobalString(DocRootFlag.Name),
|
||||
EnableJit: jitEnabled,
|
||||
ForceJit: ctx.GlobalBool(VMForceJitFlag.Name),
|
||||
GasPrice: common.String2Big(ctx.GlobalString(GasPriceFlag.Name)),
|
||||
GpoMinGasPrice: common.String2Big(ctx.GlobalString(GpoMinGasPriceFlag.Name)),
|
||||
GpoMaxGasPrice: common.String2Big(ctx.GlobalString(GpoMaxGasPriceFlag.Name)),
|
||||
@ -861,61 +847,40 @@ func MakeChainConfigFromDb(ctx *cli.Context, db ethdb.Database) *params.ChainCon
|
||||
(genesis.Hash() == params.MainNetGenesisHash && !ctx.GlobalBool(TestNetFlag.Name)) ||
|
||||
(genesis.Hash() == params.TestNetGenesisHash && ctx.GlobalBool(TestNetFlag.Name))
|
||||
|
||||
// Set any missing chainConfig fields due to them being unset or system upgrade
|
||||
if defaults {
|
||||
if config.HomesteadBlock == nil {
|
||||
if ctx.GlobalBool(TestNetFlag.Name) {
|
||||
config.HomesteadBlock = params.TestNetHomesteadBlock
|
||||
} else {
|
||||
config.HomesteadBlock = params.MainNetHomesteadBlock
|
||||
}
|
||||
// Homestead fork
|
||||
if ctx.GlobalBool(TestNetFlag.Name) {
|
||||
config.HomesteadBlock = params.TestNetHomesteadBlock
|
||||
} else {
|
||||
config.HomesteadBlock = params.MainNetHomesteadBlock
|
||||
}
|
||||
if config.DAOForkBlock == nil {
|
||||
if ctx.GlobalBool(TestNetFlag.Name) {
|
||||
config.DAOForkBlock = params.TestNetDAOForkBlock
|
||||
} else {
|
||||
config.DAOForkBlock = params.MainNetDAOForkBlock
|
||||
}
|
||||
config.DAOForkSupport = true
|
||||
}
|
||||
if config.EIP150Block == nil {
|
||||
if ctx.GlobalBool(TestNetFlag.Name) {
|
||||
config.EIP150Block = params.TestNetHomesteadGasRepriceBlock
|
||||
} else {
|
||||
config.EIP150Block = params.MainNetHomesteadGasRepriceBlock
|
||||
}
|
||||
}
|
||||
if config.EIP150Hash == (common.Hash{}) {
|
||||
if ctx.GlobalBool(TestNetFlag.Name) {
|
||||
config.EIP150Hash = params.TestNetHomesteadGasRepriceHash
|
||||
} else {
|
||||
config.EIP150Hash = params.MainNetHomesteadGasRepriceHash
|
||||
}
|
||||
}
|
||||
if config.EIP155Block == nil {
|
||||
if ctx.GlobalBool(TestNetFlag.Name) {
|
||||
config.EIP150Block = params.TestNetSpuriousDragon
|
||||
} else {
|
||||
config.EIP155Block = params.MainNetSpuriousDragon
|
||||
}
|
||||
}
|
||||
if config.EIP158Block == nil {
|
||||
if ctx.GlobalBool(TestNetFlag.Name) {
|
||||
config.EIP158Block = params.TestNetSpuriousDragon
|
||||
} else {
|
||||
config.EIP158Block = params.MainNetSpuriousDragon
|
||||
}
|
||||
}
|
||||
if config.ChainId.BitLen() == 0 {
|
||||
if ctx.GlobalBool(TestNetFlag.Name) {
|
||||
config.ChainId = params.TestNetChainID
|
||||
} else {
|
||||
config.ChainId = params.MainNetChainID
|
||||
}
|
||||
// DAO fork
|
||||
if ctx.GlobalBool(TestNetFlag.Name) {
|
||||
config.DAOForkBlock = params.TestNetDAOForkBlock
|
||||
} else {
|
||||
config.DAOForkBlock = params.MainNetDAOForkBlock
|
||||
}
|
||||
config.DAOForkSupport = true
|
||||
}
|
||||
|
||||
// DoS reprice fork
|
||||
if ctx.GlobalBool(TestNetFlag.Name) {
|
||||
config.EIP150Block = params.TestNetHomesteadGasRepriceBlock
|
||||
config.EIP150Hash = params.TestNetHomesteadGasRepriceHash
|
||||
} else {
|
||||
config.EIP150Block = params.MainNetHomesteadGasRepriceBlock
|
||||
config.EIP150Hash = params.MainNetHomesteadGasRepriceHash
|
||||
}
|
||||
// DoS state cleanup fork
|
||||
if ctx.GlobalBool(TestNetFlag.Name) {
|
||||
config.EIP155Block = params.TestNetSpuriousDragon
|
||||
config.EIP158Block = params.TestNetSpuriousDragon
|
||||
config.ChainId = params.TestNetChainID
|
||||
} else {
|
||||
config.EIP155Block = params.MainNetSpuriousDragon
|
||||
config.EIP158Block = params.MainNetSpuriousDragon
|
||||
config.ChainId = params.MainNetChainID
|
||||
}
|
||||
}
|
||||
// Force override any existing configs if explicitly requested
|
||||
switch {
|
||||
case ctx.GlobalBool(SupportDAOFork.Name):
|
||||
|
@ -28,10 +28,10 @@ import (
|
||||
)
|
||||
|
||||
const (
|
||||
VersionMajor = 1 // Major version component of the current release
|
||||
VersionMinor = 5 // Minor version component of the current release
|
||||
VersionPatch = 0 // Patch version component of the current release
|
||||
VersionMeta = "stable" // Version metadata to append to the version string
|
||||
VersionMajor = 1 // Major version component of the current release
|
||||
VersionMinor = 5 // Minor version component of the current release
|
||||
VersionPatch = 2 // Patch version component of the current release
|
||||
VersionMeta = "stable" // Version metadata to append to the version string
|
||||
)
|
||||
|
||||
// Version holds the textual version string.
|
||||
|
@ -2,7 +2,7 @@ FROM alpine:3.4
|
||||
|
||||
RUN \
|
||||
apk add --update go git make gcc musl-dev && \
|
||||
git clone --depth 1 --branch develop https://github.com/ethereum/go-ethereum && \
|
||||
git clone --depth 1 https://github.com/ethereum/go-ethereum && \
|
||||
(cd go-ethereum && make geth) && \
|
||||
cp go-ethereum/build/bin/geth /geth && \
|
||||
apk del go git make gcc musl-dev && \
|
||||
|
@ -2,7 +2,7 @@ FROM alpine:3.4
|
||||
|
||||
RUN \
|
||||
apk add --update go git make gcc musl-dev && \
|
||||
git clone --depth 1 https://github.com/ethereum/go-ethereum && \
|
||||
git clone --depth 1 --branch release/1.5 https://github.com/ethereum/go-ethereum && \
|
||||
(cd go-ethereum && make geth) && \
|
||||
cp go-ethereum/build/bin/geth /geth && \
|
||||
apk del go git make gcc musl-dev && \
|
||||
|
@ -251,7 +251,7 @@ func ValidateHeader(config *params.ChainConfig, pow pow.PoW, header *types.Heade
|
||||
if err := ValidateDAOHeaderExtraData(config, header); err != nil {
|
||||
return err
|
||||
}
|
||||
if config.EIP150Block != nil && config.EIP150Block.Cmp(header.Number) == 0 {
|
||||
if !uncle && config.EIP150Block != nil && config.EIP150Block.Cmp(header.Number) == 0 {
|
||||
if config.EIP150Hash != (common.Hash{}) && config.EIP150Hash != header.Hash() {
|
||||
return ValidationError("Homestead gas reprice fork hash mismatch: have 0x%x, want 0x%x", header.Hash(), config.EIP150Hash)
|
||||
}
|
||||
|
@ -395,7 +395,7 @@ func makeCht(db ethdb.Database) bool {
|
||||
} else {
|
||||
lastChtNum++
|
||||
|
||||
glog.V(logger.Info).Infoln("CHT %d %064x\n", lastChtNum, root)
|
||||
glog.V(logger.Detail).Infof("cht: %d %064x", lastChtNum, root)
|
||||
|
||||
storeChtRoot(db, lastChtNum, root)
|
||||
var data [8]byte
|
||||
|
@ -130,6 +130,7 @@ func NewNode(datadir string, config *NodeConfig) (*Node, error) {
|
||||
if config.EthereumEnabled {
|
||||
ethConf := ð.Config{
|
||||
ChainConfig: ¶ms.ChainConfig{
|
||||
ChainId: big.NewInt(config.EthereumChainConfig.ChainID),
|
||||
HomesteadBlock: big.NewInt(config.EthereumChainConfig.HomesteadBlock),
|
||||
DAOForkBlock: big.NewInt(config.EthereumChainConfig.DAOForkBlock),
|
||||
DAOForkSupport: config.EthereumChainConfig.DAOForkSupport,
|
||||
|
@ -27,6 +27,7 @@ import (
|
||||
// MainnetChainConfig returns the chain configurations for the main Ethereum network.
|
||||
func MainnetChainConfig() *ChainConfig {
|
||||
return &ChainConfig{
|
||||
ChainID: params.MainNetChainID.Int64(),
|
||||
HomesteadBlock: params.MainNetHomesteadBlock.Int64(),
|
||||
DAOForkBlock: params.MainNetDAOForkBlock.Int64(),
|
||||
DAOForkSupport: true,
|
||||
@ -46,9 +47,10 @@ func MainnetGenesis() string {
|
||||
// TestnetChainConfig returns the chain configurations for the Ethereum test network.
|
||||
func TestnetChainConfig() *ChainConfig {
|
||||
return &ChainConfig{
|
||||
ChainID: params.TestNetChainID.Int64(),
|
||||
HomesteadBlock: params.TestNetHomesteadBlock.Int64(),
|
||||
DAOForkBlock: 0,
|
||||
DAOForkSupport: false,
|
||||
DAOForkSupport: true,
|
||||
EIP150Block: params.TestNetHomesteadGasRepriceBlock.Int64(),
|
||||
EIP150Hash: Hash{params.TestNetHomesteadGasRepriceHash},
|
||||
EIP155Block: params.TestNetSpuriousDragon.Int64(),
|
||||
@ -63,6 +65,7 @@ func TestnetGenesis() string {
|
||||
|
||||
// ChainConfig is the core config which determines the blockchain settings.
|
||||
type ChainConfig struct {
|
||||
ChainID int64 // Chain ID for replay protection
|
||||
HomesteadBlock int64 // Homestead switch block
|
||||
DAOForkBlock int64 // TheDAO hard-fork switch block
|
||||
DAOForkSupport bool // Whether the nodes supports or opposes the DAO hard-fork
|
||||
|
@ -24,6 +24,7 @@ import (
|
||||
|
||||
// MainnetChainConfig is the chain parameters to run a node on the main network.
|
||||
var MainnetChainConfig = &ChainConfig{
|
||||
ChainId: MainNetChainID,
|
||||
HomesteadBlock: MainNetHomesteadBlock,
|
||||
DAOForkBlock: MainNetDAOForkBlock,
|
||||
DAOForkSupport: true,
|
||||
@ -35,6 +36,7 @@ var MainnetChainConfig = &ChainConfig{
|
||||
|
||||
// TestnetChainConfig is the chain parameters to run a node on the test network.
|
||||
var TestnetChainConfig = &ChainConfig{
|
||||
ChainId: TestNetChainID,
|
||||
HomesteadBlock: TestNetHomesteadBlock,
|
||||
DAOForkBlock: TestNetDAOForkBlock,
|
||||
DAOForkSupport: false,
|
||||
|
Reference in New Issue
Block a user