Skip to content

Commit

Permalink
Add a regression test for #2869. (#2870)
Browse files Browse the repository at this point in the history
  • Loading branch information
afck authored Nov 12, 2024
1 parent 5a65224 commit 374baf5
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions linera-core/src/unit_tests/client_tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -511,6 +511,26 @@ where
.await
.unwrap()
.unwrap();

// Regression test for #2869.
let sub_message_id = MessageId {
index: message_id.index + 1,
..message_id
};
assert_matches!(
certificate.executed_block().messages()[0][sub_message_id.index as usize].message,
Message::System(SystemMessage::Subscribe { .. })
);
assert_eq!(
sender
.client
.local_node()
.certificate_for(&sub_message_id)
.await
.unwrap(),
certificate.clone().into()
);

assert_eq!(sender.next_block_height(), BlockHeight::from(1));
assert!(sender.pending_block().is_none());
assert!(sender.key_pair().await.is_ok());
Expand Down

0 comments on commit 374baf5

Please sign in to comment.