From c04c8f10f04a41e762589358418c65fd99891bb4 Mon Sep 17 00:00:00 2001 From: Jeffrey Wilcke Date: Wed, 23 Nov 2016 13:32:25 +0100 Subject: core: improved bad block error reporting (#3320) --- params/config.go | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'params') 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)) -- cgit v1.2.3