add Debug and constructor for CarnotSettings (#71)
This commit is contained in:
parent
320755d19d
commit
6b45bf408e
@ -8,6 +8,7 @@ use crate::fountain::{FountainCode, FountainError};
|
||||
|
||||
/// Fountain code that does no protocol at all.
|
||||
/// Just bypasses the raw bytes into a single chunk and reconstruct from it.
|
||||
#[derive(Debug)]
|
||||
pub struct MockFountain;
|
||||
|
||||
#[async_trait]
|
||||
|
@ -56,6 +56,16 @@ impl<Fountain: FountainCode> Clone for CarnotSettings<Fountain> {
|
||||
}
|
||||
}
|
||||
|
||||
impl<Fountain: FountainCode> CarnotSettings<Fountain> {
|
||||
#[inline]
|
||||
pub const fn new(private_key: [u8; 32], fountain_settings: Fountain::Settings) -> Self {
|
||||
Self {
|
||||
private_key,
|
||||
fountain_settings,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
pub struct CarnotConsensus<A, P, M, F>
|
||||
where
|
||||
F: FountainCode,
|
||||
|
@ -95,7 +95,7 @@ fn test_mockmempool() {
|
||||
let (mtx, mrx) = tokio::sync::oneshot::channel();
|
||||
mempool_outbound
|
||||
.send(MempoolMsg::View {
|
||||
ancestor_hint: BlockId,
|
||||
ancestor_hint: BlockId::default(),
|
||||
reply_channel: mtx,
|
||||
})
|
||||
.await
|
||||
|
Loading…
x
Reference in New Issue
Block a user