From 2e266ecab2a8cd84788e9571d139bebbb44c649e Mon Sep 17 00:00:00 2001 From: Thomas Dinsdale-Young Date: Thu, 16 Jan 2025 13:15:22 +0100 Subject: [PATCH 1/3] Add `Default` instance for `UpdateSequenceNumber`. --- concordium-grpc-api | 2 +- rust-src/concordium_base/src/base.rs | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/concordium-grpc-api b/concordium-grpc-api index 30ebd6231..9f4906ca2 160000 --- a/concordium-grpc-api +++ b/concordium-grpc-api @@ -1 +1 @@ -Subproject commit 30ebd62312470f7dbb93309a4fc58e9082d0fedc +Subproject commit 9f4906ca20d687e79a83de8058d302757aee0e80 diff --git a/rust-src/concordium_base/src/base.rs b/rust-src/concordium_base/src/base.rs index 72ccf98d9..b1a83325c 100644 --- a/rust-src/concordium_base/src/base.rs +++ b/rust-src/concordium_base/src/base.rs @@ -350,7 +350,7 @@ impl Nonce { #[serde(transparent)] #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Debug, FromStr, Display, From, Into)] /// Equivalent of a transaction nonce but for update instructions. Update -/// sequence numbers are per update type. +/// sequence numbers are per update type. The minimum sequence number is 1. pub struct UpdateSequenceNumber { pub number: u64, } @@ -369,6 +369,10 @@ impl UpdateSequenceNumber { pub fn next_mut(&mut self) { self.number += 1; } } +impl Default for UpdateSequenceNumber { + fn default() -> Self { Self { number: 1 } } +} + #[repr(transparent)] #[derive(SerdeSerialize, SerdeDeserialize, Serialize)] #[serde(transparent)] From 3d779e39dbd84a3670e3b4ae9b61bac07a34749d Mon Sep 17 00:00:00 2001 From: Thomas Dinsdale-Young Date: Thu, 16 Jan 2025 13:45:01 +0100 Subject: [PATCH 2/3] Update grpc-api --- concordium-grpc-api | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/concordium-grpc-api b/concordium-grpc-api index 9f4906ca2..7d7e61af3 160000 --- a/concordium-grpc-api +++ b/concordium-grpc-api @@ -1 +1 @@ -Subproject commit 9f4906ca20d687e79a83de8058d302757aee0e80 +Subproject commit 7d7e61af30df406de28955364e3ced2a86950d86 From 97744bdc7f888708539a22e688208086c7bad7cc Mon Sep 17 00:00:00 2001 From: Thomas Dinsdale-Young Date: Thu, 16 Jan 2025 14:12:13 +0100 Subject: [PATCH 3/3] Update changelog. --- rust-src/concordium_base/CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/rust-src/concordium_base/CHANGELOG.md b/rust-src/concordium_base/CHANGELOG.md index ccd391dee..d7f9a5ab7 100644 --- a/rust-src/concordium_base/CHANGELOG.md +++ b/rust-src/concordium_base/CHANGELOG.md @@ -3,6 +3,7 @@ - Add constructor `TokenAddress::new` for CIS2 type `TokenAddress`. - Introduce new chain parameters `ValidatorScoreParameters` that contain the threshold of maximal missed rounds before a validator gets suspended. +- Add `Default` instance for `UpdateSequenceNumber`. ## 6.0.0