mirror of
https://github.com/tendermint/tendermint.git
synced 2026-08-21 06:36:19 +00:00
wip
This commit is contained in:
+10
-1
@@ -76,6 +76,7 @@ type VersionParams struct {
|
||||
}
|
||||
|
||||
// TimestampParams influence the validity of block timestamps.
|
||||
// TODO (@wbanfield): add link to proposer-based timestamp spec when completed.
|
||||
type TimestampParams struct {
|
||||
Precision time.Duration `json:"precision"`
|
||||
Accuracy time.Duration `json:"accuracy"`
|
||||
@@ -89,11 +90,11 @@ func DefaultConsensusParams() *ConsensusParams {
|
||||
Evidence: DefaultEvidenceParams(),
|
||||
Validator: DefaultValidatorParams(),
|
||||
Version: DefaultVersionParams(),
|
||||
Timestamp: DefaultTimestampParams(),
|
||||
}
|
||||
}
|
||||
|
||||
// DefaultBlockParams returns a default BlockParams.
|
||||
// TODO (@wbanfield): add link to proposer-based timestamp spec when completed.
|
||||
func DefaultBlockParams() BlockParams {
|
||||
return BlockParams{
|
||||
MaxBytes: 22020096, // 21MB
|
||||
@@ -124,6 +125,14 @@ func DefaultVersionParams() VersionParams {
|
||||
}
|
||||
}
|
||||
|
||||
func DefaultTimestampParams() TimestampParams {
|
||||
return TimestampParams{
|
||||
Precision: 0,
|
||||
Accuracy: 0,
|
||||
MsgDelay: 0,
|
||||
}
|
||||
}
|
||||
|
||||
func (val *ValidatorParams) IsValidPubkeyType(pubkeyType string) bool {
|
||||
for i := 0; i < len(val.PubKeyTypes); i++ {
|
||||
if val.PubKeyTypes[i] == pubkeyType {
|
||||
|
||||
Reference in New Issue
Block a user