mirror of
https://github.com/fluencelabs/tendermint
synced 2025-06-30 21:21:39 +00:00
Merge remote-tracking branch 'origin/consensus_tests' into develop
This commit is contained in:
@ -1316,10 +1316,8 @@ func (cs *ConsensusState) saveBlock(block *types.Block, blockParts *types.PartSe
|
|||||||
|
|
||||||
// Fire off event
|
// Fire off event
|
||||||
if cs.evsw != nil && cs.evc != nil {
|
if cs.evsw != nil && cs.evc != nil {
|
||||||
go func(block *types.Block) {
|
cs.evsw.FireEvent(types.EventStringNewBlock(), types.EventDataNewBlock{block})
|
||||||
cs.evsw.FireEvent(types.EventStringNewBlock(), types.EventDataNewBlock{block})
|
go cs.evc.Flush()
|
||||||
cs.evc.Flush()
|
|
||||||
}(block)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
1177
consensus/state_test.go
Normal file
1177
consensus/state_test.go
Normal file
File diff suppressed because it is too large
Load Diff
@ -8,6 +8,7 @@ import (
|
|||||||
|
|
||||||
bc "github.com/tendermint/tendermint/blockchain"
|
bc "github.com/tendermint/tendermint/blockchain"
|
||||||
dbm "github.com/tendermint/tendermint/db"
|
dbm "github.com/tendermint/tendermint/db"
|
||||||
|
"github.com/tendermint/tendermint/events"
|
||||||
mempl "github.com/tendermint/tendermint/mempool"
|
mempl "github.com/tendermint/tendermint/mempool"
|
||||||
"github.com/tendermint/tendermint/p2p"
|
"github.com/tendermint/tendermint/p2p"
|
||||||
sm "github.com/tendermint/tendermint/state"
|
sm "github.com/tendermint/tendermint/state"
|
||||||
@ -206,6 +207,9 @@ func simpleConsensusState(nValidators int) ([]*ConsensusState, []*types.PrivVali
|
|||||||
cs := NewConsensusState(state, blockStore, mempoolReactor)
|
cs := NewConsensusState(state, blockStore, mempoolReactor)
|
||||||
cs.SetPrivValidator(privVals[i])
|
cs.SetPrivValidator(privVals[i])
|
||||||
|
|
||||||
|
evsw := events.NewEventSwitch()
|
||||||
|
cs.SetFireable(evsw)
|
||||||
|
|
||||||
// read off the NewHeightStep
|
// read off the NewHeightStep
|
||||||
<-cs.NewStepCh()
|
<-cs.NewStepCh()
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user