Skip to content

Commit e42159d

Browse files
committed
graph: Remove SubstreamsError
1 parent 2524e1c commit e42159d

File tree

1 file changed

+0
-49
lines changed

1 file changed

+0
-49
lines changed

graph/src/blockchain/block_stream.rs

Lines changed: 0 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ use crate::{prelude::*, prometheus::labels};
2121

2222
pub const BUFFERED_BLOCK_STREAM_SIZE: usize = 100;
2323
pub const FIREHOSE_BUFFER_STREAM_SIZE: usize = 1;
24-
pub const SUBSTREAMS_BUFFER_STREAM_SIZE: usize = 100;
2524

2625
pub struct BufferedBlockStream<C: Blockchain> {
2726
inner: Pin<Box<dyn Stream<Item = Result<BlockStreamEvent<C>, BlockStreamError>> + Send>>,
@@ -700,58 +699,10 @@ impl From<BlockStreamError> for FirehoseError {
700699
}
701700
}
702701

703-
#[derive(Error, Debug)]
704-
pub enum SubstreamsError {
705-
#[error("response is missing the clock information")]
706-
MissingClockError,
707-
708-
#[error("invalid undo message")]
709-
InvalidUndoError,
710-
711-
#[error("entity validation failed {0}")]
712-
EntityValidationError(#[from] crate::data::store::EntityValidationError),
713-
714-
/// We were unable to decode the received block payload into the chain specific Block struct (e.g. chain_ethereum::pb::Block)
715-
#[error("received gRPC block payload cannot be decoded: {0}")]
716-
DecodingError(#[from] prost::DecodeError),
717-
718-
/// Some unknown error occurred
719-
#[error("unknown error {0}")]
720-
UnknownError(#[from] anyhow::Error),
721-
722-
#[error("multiple module output error")]
723-
MultipleModuleOutputError,
724-
725-
#[error("module output was not available (none) or wrong data provided")]
726-
ModuleOutputNotPresentOrUnexpected,
727-
728-
#[error("unexpected store delta output")]
729-
UnexpectedStoreDeltaOutput,
730-
}
731-
732-
impl SubstreamsError {
733-
pub fn is_deterministic(&self) -> bool {
734-
use SubstreamsError::*;
735-
736-
match self {
737-
EntityValidationError(_) => true,
738-
MissingClockError
739-
| InvalidUndoError
740-
| DecodingError(_)
741-
| UnknownError(_)
742-
| MultipleModuleOutputError
743-
| ModuleOutputNotPresentOrUnexpected
744-
| UnexpectedStoreDeltaOutput => false,
745-
}
746-
}
747-
}
748-
749702
#[derive(Debug, Error)]
750703
pub enum BlockStreamError {
751704
#[error("Failed to decode protobuf {0}")]
752705
ProtobufDecodingError(#[from] prost::DecodeError),
753-
#[error("substreams error: {0}")]
754-
SubstreamsError(#[from] SubstreamsError),
755706
#[error("block stream error {0}")]
756707
Unknown(#[from] anyhow::Error),
757708
#[error("block stream fatal error {0}")]

0 commit comments

Comments
 (0)