mirror of
https://github.com/fluencelabs/tendermint
synced 2025-06-12 12:51:22 +00:00
config: block size, consensus timeouts, recheck tx
This commit is contained in:
@ -11,6 +11,10 @@ import (
|
||||
"github.com/tendermint/tendermint/types"
|
||||
)
|
||||
|
||||
func (tp *TimeoutParams) ensureProposeTimeout() time.Duration {
|
||||
return time.Duration(tp.Propose0*2) * time.Millisecond
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
ProposeSuite
|
||||
@ -44,12 +48,6 @@ x * TestHalt1 - if we see +2/3 precommits after timing out into new round, we sh
|
||||
//----------------------------------------------------------------------------------------------------
|
||||
// ProposeSuite
|
||||
|
||||
func init() {
|
||||
fmt.Println("")
|
||||
timeoutPropose0 = 100 * time.Millisecond
|
||||
timeoutProposeDelta = 1 * time.Millisecond
|
||||
}
|
||||
|
||||
func TestProposerSelection0(t *testing.T) {
|
||||
cs1, vss := randConsensusState(4)
|
||||
height, round := cs1.Height, cs1.Round
|
||||
@ -124,7 +122,7 @@ func TestEnterProposeNoPrivValidator(t *testing.T) {
|
||||
startTestRound(cs, height, round)
|
||||
|
||||
// if we're not a validator, EnterPropose should timeout
|
||||
ticker := time.NewTicker(timeoutPropose0 * 2)
|
||||
ticker := time.NewTicker(cs.timeoutParams.ensureProposeTimeout())
|
||||
select {
|
||||
case <-timeoutCh:
|
||||
case <-ticker.C:
|
||||
@ -165,7 +163,7 @@ func TestEnterProposeYesPrivValidator(t *testing.T) {
|
||||
}
|
||||
|
||||
// if we're a validator, enterPropose should not timeout
|
||||
ticker := time.NewTicker(timeoutPropose0 * 2)
|
||||
ticker := time.NewTicker(cs.timeoutParams.ensureProposeTimeout())
|
||||
select {
|
||||
case <-timeoutCh:
|
||||
t.Fatal("Expected EnterPropose not to timeout")
|
||||
|
Reference in New Issue
Block a user