core: improved bad block error reporting (#3320)
This commit is contained in:
@ -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))
|
||||
|
Reference in New Issue
Block a user