Start filling out message handling in SwarmTask

This commit is contained in:
Luke Parker
2025-01-05 01:23:28 -05:00
parent c6d0fb477c
commit 257f691277
4 changed files with 54 additions and 8 deletions

View File

@@ -10,6 +10,7 @@ use libp2p::gossipsub::{
IdentTopic, MessageId, MessageAuthenticity, ValidationMode, ConfigBuilder, IdentityTransform,
AllowAllSubscriptionFilter, Behaviour,
};
pub use libp2p::gossipsub::Event;
use serai_cosign::SignedCosign;
@@ -27,7 +28,7 @@ fn topic_for_set(set: ValidatorSet) -> IdentTopic {
#[derive(Clone, BorshSerialize, BorshDeserialize)]
pub(crate) enum Message {
Tribuary { genesis: [u8; 32], message: Vec<u8> },
Tributary { set: ValidatorSet, message: Vec<u8> },
Cosign(SignedCosign),
}