diff --git a/proto-compiler/src/constants.rs b/proto-compiler/src/constants.rs index eae86ce..ab8ef4e 100644 --- a/proto-compiler/src/constants.rs +++ b/proto-compiler/src/constants.rs @@ -256,4 +256,8 @@ pub static CUSTOM_FIELD_ATTRIBUTES: &[(&str, &str)] = &[ ".tendermint.types.VersionParams.app_version", QUOTED_WITH_DEFAULT, ), + ( + ".tendermint.types.VersionParams.consensus_version", + QUOTED_WITH_DEFAULT, + ), ]; diff --git a/proto/build.rs b/proto/build.rs index 2cf3ce6..f74a282 100644 --- a/proto/build.rs +++ b/proto/build.rs @@ -4,7 +4,7 @@ use tenderdash_proto_compiler::GenerationMode; fn main() { // default Tenderdash version to use if TENDERDASH_COMMITISH is not set - const DEFAULT_VERSION: &str = "v1.1.0"; + const DEFAULT_VERSION: &str = "68a03d69dcfaa64a6edb829b6efed40e72e8e7bd"; // check if TENDERDASH_COMMITISH is already set; if not, set it to the current // version diff --git a/proto/tests/unit.rs b/proto/tests/unit.rs index 229c353..7dd4258 100644 --- a/proto/tests/unit.rs +++ b/proto/tests/unit.rs @@ -154,6 +154,7 @@ pub fn test_consensus_params_serde() { ] }, "version": { + "consensus_version": "1", "app_version": "1" }, "synchrony": { @@ -173,5 +174,6 @@ pub fn test_consensus_params_serde() { } "#; - let _new_params: ConsensusParams = serde_json::from_str(json).unwrap(); + let new_params: ConsensusParams = serde_json::from_str(json).unwrap(); + assert_eq!(new_params.version.unwrap().consensus_version, 1) }