Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove unused TaskError structs #2637

Merged
merged 1 commit into from
Feb 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 0 additions & 5 deletions crates/task-impls/src/consensus.rs
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ use tracing::warn;

use crate::vote::HandleVoteEvent;
use chrono::Utc;
use snafu::Snafu;
use std::{
collections::{BTreeMap, HashSet},
marker::PhantomData,
Expand All @@ -49,10 +48,6 @@ use std::{
use tokio::task::JoinHandle;
use tracing::{debug, error, info, instrument};

/// Error returned by the consensus task
#[derive(Snafu, Debug)]
pub struct ConsensusTaskError {}

/// Alias for the block payload commitment and the associated metadata.
pub struct CommitmentAndMetadata<PAYLOAD: BlockPayload> {
/// Vid Commitment
Expand Down
5 changes: 0 additions & 5 deletions crates/task-impls/src/da.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,17 +28,12 @@ use hotshot_types::{
use sha2::{Digest, Sha256};

use crate::vote::HandleVoteEvent;
use snafu::Snafu;
use std::{marker::PhantomData, sync::Arc};
use tracing::{debug, error, instrument, warn};

/// Alias for Optional type for Vote Collectors
type VoteCollectorOption<TYPES, VOTE, CERT> = Option<VoteCollectionTaskState<TYPES, VOTE, CERT>>;

#[derive(Snafu, Debug)]
/// Error type for consensus tasks
pub struct ConsensusTaskError {}

/// Tracks state of a DA task
pub struct DATaskState<
TYPES: NodeType,
Expand Down
5 changes: 0 additions & 5 deletions crates/task-impls/src/transactions.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ use hotshot_types::{
},
};
use hotshot_utils::bincode::bincode_opts;
use snafu::Snafu;
use std::{
collections::{HashMap, HashSet},
sync::Arc,
Expand All @@ -36,10 +35,6 @@ use tracing::{debug, error, instrument, warn};
/// A type alias for `HashMap<Commitment<T>, T>`
type CommitmentMap<T> = HashMap<Commitment<T>, T>;

#[derive(Snafu, Debug)]
/// Error type for consensus tasks
pub struct ConsensusTaskError {}

/// Tracks state of a Transaction task
pub struct TransactionTaskState<
TYPES: NodeType,
Expand Down
5 changes: 0 additions & 5 deletions crates/task-impls/src/upgrade.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,17 +21,12 @@ use hotshot_types::{
};

use crate::vote::HandleVoteEvent;
use snafu::Snafu;
use std::sync::Arc;
use tracing::{debug, error, instrument, warn};

/// Alias for Optional type for Vote Collectors
type VoteCollectorOption<TYPES, VOTE, CERT> = Option<VoteCollectionTaskState<TYPES, VOTE, CERT>>;

#[derive(Snafu, Debug)]
/// Error type for consensus tasks
pub struct ConsensusTaskError {}

/// Tracks state of a DA task
pub struct UpgradeTaskState<
TYPES: NodeType,
Expand Down
5 changes: 0 additions & 5 deletions crates/task-impls/src/vid.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,15 +25,10 @@ use hotshot_types::{
#[cfg(async_executor_impl = "tokio")]
use tokio::task::spawn_blocking;

use snafu::Snafu;
use std::marker::PhantomData;
use std::sync::Arc;
use tracing::{debug, error, instrument, warn};

#[derive(Snafu, Debug)]
/// Error type for consensus tasks
pub struct ConsensusTaskError {}

/// Tracks state of a VID task
pub struct VIDTaskState<
TYPES: NodeType,
Expand Down
5 changes: 0 additions & 5 deletions crates/task-impls/src/view_sync.rs
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ use hotshot_types::{
node_implementation::{ConsensusTime, NodeImplementation, NodeType},
},
};
use snafu::Snafu;
use std::{collections::BTreeMap, collections::HashMap, fmt::Debug, sync::Arc, time::Duration};
#[cfg(async_executor_impl = "tokio")]
use tokio::task::JoinHandle;
Expand All @@ -53,10 +52,6 @@ pub enum ViewSyncPhase {
Finalize,
}

#[derive(Snafu, Debug)]
/// Stub of a view sync error
pub struct ViewSyncTaskError {}

/// Type alias for a map from View Number to Relay to Vote Task
type RelayMap<TYPES, VOTE, CERT> =
HashMap<<TYPES as NodeType>::Time, BTreeMap<u64, VoteCollectionTaskState<TYPES, VOTE, CERT>>>;
Expand Down
5 changes: 0 additions & 5 deletions crates/task-impls/src/vote.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,8 @@ use hotshot_types::{
traits::{election::Membership, node_implementation::NodeType},
vote::{Certificate, HasViewNumber, Vote, VoteAccumulator},
};
use snafu::Snafu;
use tracing::{debug, error};

#[derive(Snafu, Debug)]
/// Stub of a vote error
pub struct VoteTaskError {}

/// Task state for collecting votes of one type and emiting a certificate
pub struct VoteCollectionTaskState<
TYPES: NodeType,
Expand Down