From 1f7d3c6dc755c94b95e755ea91bf5a8930fce39c Mon Sep 17 00:00:00 2001 From: Yoni Date: Thu, 31 Jan 2019 16:25:57 +0200 Subject: [PATCH] - Change slate version to uint - Add default 0 incase it's missing (pre-versioning) --- core/src/libtx/slate.rs | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/core/src/libtx/slate.rs b/core/src/libtx/slate.rs index e6bb7090b..85d91bef5 100644 --- a/core/src/libtx/slate.rs +++ b/core/src/libtx/slate.rs @@ -122,7 +122,12 @@ pub struct Slate { /// is receiver, though this will change for multi-party pub participant_data: Vec, /// Slate format version - pub version: Option, + #[serde(default = "no_version")] + pub version: u64, +} + +fn no_version() -> u64 { + 0 } /// Helper just to facilitate serialization @@ -144,7 +149,7 @@ impl Slate { height: 0, lock_height: 0, participant_data: vec![], - version: Some(CURRENT_SLATE_VERSION), + version: CURRENT_SLATE_VERSION, } }