aboutsummaryrefslogtreecommitdiffstats
path: root/params/config.go
diff options
context:
space:
mode:
Diffstat (limited to 'params/config.go')
-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))