From d5f4a19ddb96503a2236e670a1eee297a839d45b Mon Sep 17 00:00:00 2001 From: William Banfield Date: Tue, 22 Mar 2022 10:21:48 -0400 Subject: [PATCH] fmt --- types/params.go | 30 +++++++++++++++--------------- types/params_test.go | 20 ++++++++++---------- 2 files changed, 25 insertions(+), 25 deletions(-) diff --git a/types/params.go b/types/params.go index 398d5c5b7..6a2920590 100644 --- a/types/params.go +++ b/types/params.go @@ -88,11 +88,11 @@ type SynchronyParams struct { // TimeoutParams configure the timings of the steps of the Tendermint consensus algorithm. type TimeoutParams struct { - Propose time.Duration `json:"propose,string"` - ProposeDelta time.Duration `json:"propose_delta,string"` - Vote time.Duration `json:"vote,string"` - VoteDelta time.Duration `json:"vote_delta,string"` - Commit time.Duration `json:"commit,string"` + Propose time.Duration `json:"propose,string"` + ProposeDelta time.Duration `json:"propose_delta,string"` + Vote time.Duration `json:"vote,string"` + VoteDelta time.Duration `json:"vote_delta,string"` + Commit time.Duration `json:"commit,string"` BypassCommitTimeout bool `json:"bypass_commit_timeout"` } @@ -152,11 +152,11 @@ func DefaultSynchronyParams() SynchronyParams { func DefaultTimeoutParams() TimeoutParams { return TimeoutParams{ - Propose: 3000 * time.Millisecond, - ProposeDelta: 500 * time.Millisecond, - Vote: 1000 * time.Millisecond, - VoteDelta: 500 * time.Millisecond, - Commit: 1000 * time.Millisecond, + Propose: 3000 * time.Millisecond, + ProposeDelta: 500 * time.Millisecond, + Vote: 1000 * time.Millisecond, + VoteDelta: 500 * time.Millisecond, + Commit: 1000 * time.Millisecond, BypassCommitTimeout: false, } } @@ -373,11 +373,11 @@ func (params *ConsensusParams) ToProto() tmproto.ConsensusParams { Precision: ¶ms.Synchrony.Precision, }, Timeout: &tmproto.TimeoutParams{ - Propose: ¶ms.Timeout.Propose, - ProposeDelta: ¶ms.Timeout.ProposeDelta, - Vote: ¶ms.Timeout.Vote, - VoteDelta: ¶ms.Timeout.VoteDelta, - Commit: ¶ms.Timeout.Commit, + Propose: ¶ms.Timeout.Propose, + ProposeDelta: ¶ms.Timeout.ProposeDelta, + Vote: ¶ms.Timeout.Vote, + VoteDelta: ¶ms.Timeout.VoteDelta, + Commit: ¶ms.Timeout.Commit, BypassCommitTimeout: params.Timeout.BypassCommitTimeout, }, } diff --git a/types/params_test.go b/types/params_test.go index 27ec560ee..f7b012ff4 100644 --- a/types/params_test.go +++ b/types/params_test.go @@ -205,11 +205,11 @@ func makeParams(args makeParamsArgs) ConsensusParams { MessageDelay: args.messageDelay, }, Timeout: TimeoutParams{ - Propose: args.propose, - ProposeDelta: args.proposeDelta, - Vote: args.vote, - VoteDelta: args.voteDelta, - Commit: args.commit, + Propose: args.propose, + ProposeDelta: args.proposeDelta, + Vote: args.vote, + VoteDelta: args.voteDelta, + Commit: args.commit, BypassCommitTimeout: args.enableCommitTimeoutBypass, }, } @@ -277,11 +277,11 @@ func TestConsensusParamsUpdate(t *testing.T) { }), updates: &tmproto.ConsensusParams{ Timeout: &tmproto.TimeoutParams{ - Propose: durationPtr(2 * time.Second), - ProposeDelta: durationPtr(400 * time.Millisecond), - Vote: durationPtr(5 * time.Second), - VoteDelta: durationPtr(400 * time.Millisecond), - Commit: durationPtr(time.Minute), + Propose: durationPtr(2 * time.Second), + ProposeDelta: durationPtr(400 * time.Millisecond), + Vote: durationPtr(5 * time.Second), + VoteDelta: durationPtr(400 * time.Millisecond), + Commit: durationPtr(time.Minute), BypassCommitTimeout: true, }, },