Browse Source

update commit timeout name in tests

pull/8177/head
William Banfield 3 years ago
parent
commit
c50884c0e3
No known key found for this signature in database GPG Key ID: EFAD3442BF29E3AC
1 changed files with 26 additions and 26 deletions
  1. +26
    -26
      types/params_test.go

+ 26
- 26
types/params_test.go View File

@ -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


Loading…
Cancel
Save