mirror of
https://github.com/tendermint/tendermint.git
synced 2026-08-22 07:06:14 +00:00
update commit timeout name
This commit is contained in:
+1
-1
@@ -608,7 +608,7 @@ var testGenesisFmt = `{
|
||||
"vote": "30000000000",
|
||||
"vote_delta": "50000000",
|
||||
"commit": "10000000000",
|
||||
"enable_commit_timeout_bypass": false
|
||||
"bypass_commit_timeout": false
|
||||
},
|
||||
"evidence": {
|
||||
"max_age_num_blocks": "100000",
|
||||
|
||||
@@ -149,7 +149,7 @@ message TimeoutParams {
|
||||
google.protobuf.Duration vote = 3;
|
||||
google.protobuf.Duration vote_delta = 4;
|
||||
google.protobuf.Duration commit = 5;
|
||||
bool enable_commit_timeout_bypass = 6;
|
||||
bool bypass_commit_timeout = 6;
|
||||
}
|
||||
```
|
||||
|
||||
|
||||
@@ -466,7 +466,7 @@ func SumTruncated(bz []byte) []byte {
|
||||
| vote | [google.protobuf.Duration](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.Duration)| Parameter that, along with vote_delta, configures the timeout for the prevote and precommit step of the consensus algorithm. | 3 |
|
||||
| vote_delta | [google.protobuf.Duration](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.Duration)| Parameter that, along with vote, configures the timeout for the prevote and precommit step of the consensus algorithm. | 4 |
|
||||
| commit | [google.protobuf.Duration](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.Duration) | Parameter that configures how long Tendermint will wait after receiving a quorum of precommits before beginning consensus for the next height.| 5 |
|
||||
| enable_commit_timeout_bypass | bool | Parameter that, if enabled, configures the node to proceed immediately to the next height once the node has received all precommits for a block, forgoing the commit timeout. | 6 |
|
||||
| bypass_commit_timeout | bool | Parameter that, if enabled, configures the node to proceed immediately to the next height once the node has received all precommits for a block, forgoing the commit timeout. | 6 |
|
||||
|
||||
## Proof
|
||||
|
||||
|
||||
@@ -78,7 +78,7 @@ func TestBasicGenesisDoc(t *testing.T) {
|
||||
"vote": "30000000000",
|
||||
"vote_delta": "50000000",
|
||||
"commit": "10000000000",
|
||||
"enable_commit_timeout_bypass": false
|
||||
"bypass_commit_timeout": false
|
||||
},
|
||||
"validator": {"pub_key_types":["ed25519"]},
|
||||
"block": {"max_bytes": "100"},
|
||||
|
||||
+5
-5
@@ -93,7 +93,7 @@ type TimeoutParams struct {
|
||||
Vote time.Duration `json:"vote,string"`
|
||||
VoteDelta time.Duration `json:"vote_delta,string"`
|
||||
Commit time.Duration `json:"commit,string"`
|
||||
EnableCommitTimeoutBypass bool `json:"enable_commit_timeout_bypass"`
|
||||
BypassCommitTimeout bool `json:"bypass_commit_timeout"`
|
||||
}
|
||||
|
||||
// DefaultConsensusParams returns a default ConsensusParams.
|
||||
@@ -157,7 +157,7 @@ func DefaultTimeoutParams() TimeoutParams {
|
||||
Vote: 1000 * time.Millisecond,
|
||||
VoteDelta: 500 * time.Millisecond,
|
||||
Commit: 1000 * time.Millisecond,
|
||||
EnableCommitTimeoutBypass: false,
|
||||
BypassCommitTimeout: false,
|
||||
}
|
||||
}
|
||||
|
||||
@@ -346,7 +346,7 @@ func (params ConsensusParams) UpdateConsensusParams(params2 *tmproto.ConsensusPa
|
||||
if params2.Timeout.Commit != nil {
|
||||
res.Timeout.Commit = *params2.Timeout.GetCommit()
|
||||
}
|
||||
res.Timeout.EnableCommitTimeoutBypass = params2.Timeout.GetEnableCommitTimeoutBypass()
|
||||
res.Timeout.BypassCommitTimeout = params2.Timeout.GetBypassCommitTimeout()
|
||||
}
|
||||
return res
|
||||
}
|
||||
@@ -378,7 +378,7 @@ func (params *ConsensusParams) ToProto() tmproto.ConsensusParams {
|
||||
Vote: ¶ms.Timeout.Vote,
|
||||
VoteDelta: ¶ms.Timeout.VoteDelta,
|
||||
Commit: ¶ms.Timeout.Commit,
|
||||
EnableCommitTimeoutBypass: params.Timeout.EnableCommitTimeoutBypass,
|
||||
BypassCommitTimeout: params.Timeout.BypassCommitTimeout,
|
||||
},
|
||||
}
|
||||
}
|
||||
@@ -425,7 +425,7 @@ func ConsensusParamsFromProto(pbParams tmproto.ConsensusParams) ConsensusParams
|
||||
if pbParams.Timeout.Commit != nil {
|
||||
c.Timeout.Commit = *pbParams.Timeout.GetCommit()
|
||||
}
|
||||
c.Timeout.EnableCommitTimeoutBypass = pbParams.Timeout.EnableCommitTimeoutBypass
|
||||
c.Timeout.BypassCommitTimeout = pbParams.Timeout.BypassCommitTimeout
|
||||
}
|
||||
return c
|
||||
}
|
||||
|
||||
@@ -210,7 +210,7 @@ func makeParams(args makeParamsArgs) ConsensusParams {
|
||||
Vote: args.vote,
|
||||
VoteDelta: args.voteDelta,
|
||||
Commit: args.commit,
|
||||
EnableCommitTimeoutBypass: args.enableCommitTimeoutBypass,
|
||||
BypassCommitTimeout: args.enableCommitTimeoutBypass,
|
||||
},
|
||||
}
|
||||
}
|
||||
@@ -282,7 +282,7 @@ func TestConsensusParamsUpdate(t *testing.T) {
|
||||
Vote: durationPtr(5 * time.Second),
|
||||
VoteDelta: durationPtr(400 * time.Millisecond),
|
||||
Commit: durationPtr(time.Minute),
|
||||
EnableCommitTimeoutBypass: true,
|
||||
BypassCommitTimeout: true,
|
||||
},
|
||||
},
|
||||
updatedParams: makeParams(makeParamsArgs{
|
||||
|
||||
Reference in New Issue
Block a user