Skip to content
This repository has been archived by the owner on Jul 30, 2024. It is now read-only.

Commit

Permalink
fix type
Browse files Browse the repository at this point in the history
  • Loading branch information
jparr721 committed Mar 18, 2024
1 parent e6099e7 commit b8ec0be
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/traits/storage.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,16 @@
use anyhow::Result;
use async_trait::async_trait;

use crate::data::{DAProposal, VidDisperse};
use crate::{
data::{DAProposal, VidDisperse},
message::Proposal,
};

use super::node_implementation::NodeType;

/// Abstraction for storing a variety of consensus payload datum.
#[async_trait]
pub trait Storage<TYPES: NodeType>: Send + Sync + Clone {
async fn append_vid(&self, proposal: &DAProposal<TYPES>) -> Result<()>;
async fn append_da(&self, proposal: &VidDisperse<TYPES>) -> Result<()>;
async fn append_vid(&self, proposal: &Proposal<TYPES, DAProposal<TYPES>>) -> Result<()>;
async fn append_da(&self, proposal: &Proposal<TYPES, VidDisperse<TYPES>>) -> Result<()>;
}

0 comments on commit b8ec0be

Please sign in to comment.