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

@@ -285,10 +285,10 @@ impl<D: Db> Cosigning<D> {
///
/// If this global session hasn't produced any notable cosigns, this will return the latest
/// cosigns for this session.
pub fn notable_cosigns(&self, global_session: [u8; 32]) -> Vec<SignedCosign> {
pub fn notable_cosigns(getter: &impl Get, global_session: [u8; 32]) -> Vec<SignedCosign> {
let mut cosigns = Vec::with_capacity(serai_client::primitives::NETWORKS.len());
for network in serai_client::primitives::NETWORKS {
if let Some(cosign) = NetworksLatestCosignedBlock::get(&self.db, global_session, network) {
if let Some(cosign) = NetworksLatestCosignedBlock::get(getter, global_session, network) {
cosigns.push(cosign);
}
}