aboutsummaryrefslogtreecommitdiffstats
path: root/params
diff options
context:
space:
mode:
authorJeffrey Wilcke <jeffrey@ethereum.org>2016-11-23 20:32:25 +0800
committerGitHub <noreply@github.com>2016-11-23 20:32:25 +0800
commitc04c8f10f04a41e762589358418c65fd99891bb4 (patch)
treee1894ef4d0cad67e45739d1db0ad05307cba9711 /params
parente05d35e6e04f1378c18861016f96b39b35cef4f2 (diff)
downloadgo-tangerine-c04c8f10f04a41e762589358418c65fd99891bb4.tar.gz
go-tangerine-c04c8f10f04a41e762589358418c65fd99891bb4.tar.zst
go-tangerine-c04c8f10f04a41e762589358418c65fd99891bb4.zip
core: improved bad block error reporting (#3320)
Diffstat (limited to 'params')
-rw-r--r--params/config.go14
1 files changed, 14 insertions, 0 deletions
diff --git a/params/config.go b/params/config.go
index d083adf46..8c285781e 100644
--- a/params/config.go
+++ b/params/config.go
@@ -17,6 +17,7 @@
package params
import (
+ "fmt"
"math/big"
"github.com/ethereum/go-ethereum/common"
@@ -66,6 +67,19 @@ type ChainConfig struct {
EIP158Block *big.Int `json:"eip158Block"` // EIP158 HF block
}
+// String implements the Stringer interface.
+func (c *ChainConfig) String() string {
+ return fmt.Sprintf("{ChainID: %v Homestead: %v DAO: %v DAOSupport: %v EIP150: %v EIP155: %v EIP158: %v}",
+ c.ChainId,
+ c.HomesteadBlock,
+ c.DAOForkBlock,
+ c.DAOForkSupport,
+ c.EIP150Block,
+ c.EIP155Block,
+ c.EIP158Block,
+ )
+}
+
var (
TestChainConfig = &ChainConfig{big.NewInt(1), new(big.Int), new(big.Int), true, new(big.Int), common.Hash{}, new(big.Int), new(big.Int)}
TestRules = TestChainConfig.Rules(new(big.Int))