|
@ -168,19 +168,19 @@ func TestConsensusParamsValidation(t *testing.T) { |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
type makeParamsArgs struct { |
|
|
type makeParamsArgs struct { |
|
|
blockBytes int64 |
|
|
|
|
|
blockGas int64 |
|
|
|
|
|
evidenceAge int64 |
|
|
|
|
|
maxEvidenceBytes int64 |
|
|
|
|
|
pubkeyTypes []string |
|
|
|
|
|
precision time.Duration |
|
|
|
|
|
messageDelay time.Duration |
|
|
|
|
|
propose time.Duration |
|
|
|
|
|
proposeDelta time.Duration |
|
|
|
|
|
vote time.Duration |
|
|
|
|
|
voteDelta time.Duration |
|
|
|
|
|
commit time.Duration |
|
|
|
|
|
enableCommitTimeoutBypass bool |
|
|
|
|
|
|
|
|
blockBytes int64 |
|
|
|
|
|
blockGas int64 |
|
|
|
|
|
evidenceAge int64 |
|
|
|
|
|
maxEvidenceBytes int64 |
|
|
|
|
|
pubkeyTypes []string |
|
|
|
|
|
precision time.Duration |
|
|
|
|
|
messageDelay time.Duration |
|
|
|
|
|
propose time.Duration |
|
|
|
|
|
proposeDelta time.Duration |
|
|
|
|
|
vote time.Duration |
|
|
|
|
|
voteDelta time.Duration |
|
|
|
|
|
commit time.Duration |
|
|
|
|
|
bypassCommitTimeout bool |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
func makeParams(args makeParamsArgs) ConsensusParams { |
|
|
func makeParams(args makeParamsArgs) ConsensusParams { |
|
@ -210,7 +210,7 @@ func makeParams(args makeParamsArgs) ConsensusParams { |
|
|
Vote: args.vote, |
|
|
Vote: args.vote, |
|
|
VoteDelta: args.voteDelta, |
|
|
VoteDelta: args.voteDelta, |
|
|
Commit: args.commit, |
|
|
Commit: args.commit, |
|
|
BypassCommitTimeout: args.enableCommitTimeoutBypass, |
|
|
|
|
|
|
|
|
BypassCommitTimeout: args.bypassCommitTimeout, |
|
|
}, |
|
|
}, |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
@ -268,12 +268,12 @@ func TestConsensusParamsUpdate(t *testing.T) { |
|
|
{ |
|
|
{ |
|
|
// update timeout params
|
|
|
// update timeout params
|
|
|
intialParams: makeParams(makeParamsArgs{ |
|
|
intialParams: makeParams(makeParamsArgs{ |
|
|
propose: 3 * time.Second, |
|
|
|
|
|
proposeDelta: 500 * time.Millisecond, |
|
|
|
|
|
vote: time.Second, |
|
|
|
|
|
voteDelta: 500 * time.Millisecond, |
|
|
|
|
|
commit: time.Second, |
|
|
|
|
|
enableCommitTimeoutBypass: false, |
|
|
|
|
|
|
|
|
propose: 3 * time.Second, |
|
|
|
|
|
proposeDelta: 500 * time.Millisecond, |
|
|
|
|
|
vote: time.Second, |
|
|
|
|
|
voteDelta: 500 * time.Millisecond, |
|
|
|
|
|
commit: time.Second, |
|
|
|
|
|
bypassCommitTimeout: false, |
|
|
}), |
|
|
}), |
|
|
updates: &tmproto.ConsensusParams{ |
|
|
updates: &tmproto.ConsensusParams{ |
|
|
Timeout: &tmproto.TimeoutParams{ |
|
|
Timeout: &tmproto.TimeoutParams{ |
|
@ -286,12 +286,12 @@ func TestConsensusParamsUpdate(t *testing.T) { |
|
|
}, |
|
|
}, |
|
|
}, |
|
|
}, |
|
|
updatedParams: makeParams(makeParamsArgs{ |
|
|
updatedParams: makeParams(makeParamsArgs{ |
|
|
propose: 2 * time.Second, |
|
|
|
|
|
proposeDelta: 400 * time.Millisecond, |
|
|
|
|
|
vote: 5 * time.Second, |
|
|
|
|
|
voteDelta: 400 * time.Millisecond, |
|
|
|
|
|
commit: time.Minute, |
|
|
|
|
|
enableCommitTimeoutBypass: true, |
|
|
|
|
|
|
|
|
propose: 2 * time.Second, |
|
|
|
|
|
proposeDelta: 400 * time.Millisecond, |
|
|
|
|
|
vote: 5 * time.Second, |
|
|
|
|
|
voteDelta: 400 * time.Millisecond, |
|
|
|
|
|
commit: time.Minute, |
|
|
|
|
|
bypassCommitTimeout: true, |
|
|
}), |
|
|
}), |
|
|
}, |
|
|
}, |
|
|
// fine updates
|
|
|
// fine updates
|
|
|