Skip to content

Commit

Permalink
Merge #3565
Browse files Browse the repository at this point in the history
3565: Fix bootstrap client side. r=AurelienFT a=AurelienFT

Fix #3564 

Co-authored-by: AurelienFT <[email protected]>
  • Loading branch information
bors[bot] and AurelienFT authored Feb 14, 2023
2 parents fe43d5c + fc623ae commit 48f6842
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion massa-async-pool/src/changes.rs
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ impl Deserializer<AsyncPoolChanges> 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);
Expand Down Expand Up @@ -214,6 +214,14 @@ impl Deserializer<AsyncPoolChanges> 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)
Expand Down

0 comments on commit 48f6842

Please sign in to comment.