ChainID() and Params() do not return errors

- remove state#GenesisDoc() method
This commit is contained in:
Anton Kaliaev
2017-10-05 16:50:05 +04:00
parent 7939d62ef0
commit 1971e149fb
9 changed files with 84 additions and 235 deletions

View File

@ -179,12 +179,9 @@ func (s *State) ValidateBlock(block *types.Block) error {
}
func (s *State) validateBlock(block *types.Block) error {
chainID := s.ChainID()
// Basic block validation.
chainID, err := s.ChainID()
if err != nil {
return err
}
err = block.ValidateBasic(chainID, s.LastBlockHeight, s.LastBlockID, s.LastBlockTime, s.AppHash)
err := block.ValidateBasic(chainID, s.LastBlockHeight, s.LastBlockID, s.LastBlockTime, s.AppHash)
if err != nil {
return err
}