Skip to content

Commit 11970cf

Browse files
committed
feat(aggregator): add a 'SignatureConsumer' trait
1 parent 7dd379c commit 11970cf

File tree

2 files changed

+17
-0
lines changed

2 files changed

+17
-0
lines changed
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
use mithril_common::{
2+
entities::{SignedEntityType, SingleSignature},
3+
StdResult,
4+
};
5+
6+
/// A signature consumer which blocks until a messages are available.
7+
#[cfg_attr(test, mockall::automock)]
8+
#[async_trait::async_trait]
9+
pub trait SignatureConsumer: Sync + Send {
10+
/// Returns signatures when available
11+
async fn get_signatures(&self) -> StdResult<Vec<(SingleSignature, SignedEntityType)>>;
12+
}
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
mod interface;
2+
mod noop;
3+
4+
pub use interface::*;
5+
pub use noop::*;

0 commit comments

Comments
 (0)