Skip to content

Commit

Permalink
Rename reply to attestation
Browse files Browse the repository at this point in the history
  • Loading branch information
danielSanchezQ committed Sep 7, 2023
1 parent 87d4d99 commit 0de183c
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
7 changes: 5 additions & 2 deletions nomos-services/data-availability/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ where
B::Blob: Send,
<B::Blob as Blob>::Hash: Debug + Send + Sync,
// TODO: Reply type must be piped together, for now empty array.
N: NetworkAdapter<Blob = B::Blob, Reply = [u8; 32]> + Send + Sync,
N: NetworkAdapter<Blob = B::Blob, Attestation = [u8; 32]> + Send + Sync,
{
fn init(service_state: ServiceStateHandle<Self>) -> Result<Self, DynError> {
let network_relay = service_state.overwatch_handle.relay();
Expand Down Expand Up @@ -117,7 +117,10 @@ where
}
}

async fn handle_new_blob<B: DaBackend, A: NetworkAdapter<Blob = B::Blob, Reply = [u8; 32]>>(
async fn handle_new_blob<
B: DaBackend,
A: NetworkAdapter<Blob = B::Blob, Attestation = [u8; 32]>,
>(
backend: &mut B,
adapter: &A,
blob: B::Blob,
Expand Down
4 changes: 2 additions & 2 deletions nomos-services/data-availability/src/network/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,13 @@ pub trait NetworkAdapter {
type Backend: NetworkBackend + 'static;

type Blob: Send + Sync + 'static;
type Reply: Send + Sync + 'static;
type Attestation: Send + Sync + 'static;

async fn new(
network_relay: OutboundRelay<<NetworkService<Self::Backend> as ServiceData>::Message>,
) -> Self;

async fn blob_stream(&self) -> Box<dyn Stream<Item = Self::Blob> + Unpin + Send>;

async fn send_attestation(&self, attestation: Self::Reply) -> Result<(), DynError>;
async fn send_attestation(&self, attestation: Self::Attestation) -> Result<(), DynError>;
}

0 comments on commit 0de183c

Please sign in to comment.