From fc623aedf6facd6d43aa062a5f42dfef70747dbd Mon Sep 17 00:00:00 2001 From: AurelienFT Date: Tue, 14 Feb 2023 21:40:46 +0100 Subject: [PATCH] Fix bootstrap client side. --- massa-async-pool/src/changes.rs | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/massa-async-pool/src/changes.rs b/massa-async-pool/src/changes.rs index 86d3efa5c5d..f7492e19bf1 100644 --- a/massa-async-pool/src/changes.rs +++ b/massa-async-pool/src/changes.rs @@ -180,7 +180,7 @@ impl Deserializer for AsyncPoolChangesDeserializer { /// datastore_key: Some(vec![1, 2, 3, 4]), /// }) /// ); - /// let changes: AsyncPoolChanges = AsyncPoolChanges(vec![Change::Add(message.compute_id(), message)]); + /// let changes: AsyncPoolChanges = AsyncPoolChanges(vec![Change::Add(message.compute_id(), message), Change::Delete(message.compute_id())]); /// let mut serialized = Vec::new(); /// let serializer = AsyncPoolChangesSerializer::new(); /// let deserializer = AsyncPoolChangesDeserializer::new(32, 100000, 100000, 100000); @@ -214,6 +214,14 @@ impl Deserializer for AsyncPoolChangesDeserializer { .map(|(id, message)| Change::Add(id, message)) .parse(&input[1..]), Some(1) => context( + "Failed Change::Activate deserialization", + context("Failed id deserialization", |input| { + self.id_deserializer.deserialize(input) + }), + ) + .map(Change::Activate) + .parse(&input[1..]), + Some(2) => context( "Failed Change::Delete deserialization", context("Failed id deserialization", |input| { self.id_deserializer.deserialize(input)