diff --git a/proto/build.rs b/proto/build.rs index d177e6fb..c613fa99 100644 --- a/proto/build.rs +++ b/proto/build.rs @@ -8,6 +8,7 @@ const VEC_BASE64STRING: &str = r#"#[serde(with = "tendermint_proto::serializers::bytes::vec_base64string")]"#; const OPTION_ANY: &str = r#"#[serde(with = "crate::serializers::option_any")]"#; const OPTION_TIMESTAMP: &str = r#"#[serde(with = "crate::serializers::option_timestamp")]"#; +const DEFAULT_TRUE: &str = r#"#[serde(default = "crate::defaults::default_true")]"#; #[rustfmt::skip] pub static CUSTOM_TYPE_ATTRIBUTES: &[(&str, &str)] = &[ @@ -48,6 +49,8 @@ pub static CUSTOM_FIELD_ATTRIBUTES: &[(&str, &str)] = &[ (".share.eds.byzantine.pb.BadEncoding.axis", QUOTED), (".proof.pb.Proof.nodes", VEC_BASE64STRING), (".proof.pb.Proof.leaf_hash", BASE64STRING), + // TODO: delete after testnets use node >= 0.11.0-rc14 + (".proof.pb.Proof.is_max_namespace_ignored", DEFAULT_TRUE), (".share.p2p.shrex.nd.NamespaceRowResponse.shares", VEC_BASE64STRING), ]; diff --git a/proto/src/defaults.rs b/proto/src/defaults.rs new file mode 100644 index 00000000..1d73eaf9 --- /dev/null +++ b/proto/src/defaults.rs @@ -0,0 +1,3 @@ +pub fn default_true() -> bool { + true +} diff --git a/proto/src/lib.rs b/proto/src/lib.rs index 982fadbb..657d2c74 100644 --- a/proto/src/lib.rs +++ b/proto/src/lib.rs @@ -1,5 +1,6 @@ #![allow(clippy::all)] +pub mod defaults; pub mod serializers; include!(concat!(env!("OUT_DIR"), "/mod.rs"));