ChainID() and Params() do not return errors

- remove state#GenesisDoc() method
This commit is contained in:
Anton Kaliaev
2017-10-16 10:34:02 +04:00
parent 7939d62ef0
commit 1971e149fb
9 changed files with 84 additions and 235 deletions
+3 -7
View File
@@ -187,6 +187,8 @@ func (bcR *BlockchainReactor) poolRoutine() {
statusUpdateTicker := time.NewTicker(statusUpdateIntervalSeconds * time.Second)
switchToConsensusTicker := time.NewTicker(switchToConsensusIntervalSeconds * time.Second)
chainID := bcR.state.ChainID()
FOR_LOOP:
for {
select {
@@ -242,13 +244,7 @@ FOR_LOOP:
// NOTE: we can probably make this more efficient, but note that calling
// first.Hash() doesn't verify the tx contents, so MakePartSet() is
// currently necessary.
chainID, err := bcR.state.ChainID()
if err != nil {
bcR.Logger.Info("error in retrieving chainID", "err", err)
bcR.pool.RedoRequest(first.Height)
break SYNC_LOOP
}
err = bcR.state.Validators.VerifyCommit(
err := bcR.state.Validators.VerifyCommit(
chainID, types.BlockID{first.Hash(), firstPartsHeader}, first.Height, second.LastCommit)
if err != nil {
bcR.Logger.Error("Error in validation", "err", err)
+1 -1
View File
@@ -7,7 +7,7 @@ import (
"io"
"sync"
"github.com/tendermint/go-wire"
wire "github.com/tendermint/go-wire"
"github.com/tendermint/tendermint/types"
. "github.com/tendermint/tmlibs/common"
dbm "github.com/tendermint/tmlibs/db"