@@ -37,43 +37,3 @@ impl EngineError {
3737 Self :: FcsError ( FcsError :: FinalizedBlockNumberNotIncreasing )
3838 }
3939}
40-
41- /// The error type for the fork choice state.
42- #[ derive( Debug , thiserror:: Error ) ]
43- pub enum FcsError {
44- /// No update was provided for head, safe or finalized.
45- #[ error( "No update provided for head, safe or finalized" ) ]
46- NoUpdateProvided ,
47- /// Finalized block number not increasing.
48- #[ error( "Finalized block number not increasing" ) ]
49- FinalizedBlockNumberNotIncreasing ,
50- /// Head block number cannot be below safe block number.
51- #[ error( "Safe block number can not be below the head block number" ) ]
52- HeadBelowSafe ,
53- /// Safe block number cannot be below finalized block number.
54- #[ error( "Safe block number can not be below the finalized block number" ) ]
55- SafeBelowFinalized ,
56- }
57-
58- /// The error type for the Engine.
59- #[ derive( Debug , thiserror:: Error ) ]
60- pub enum EngineError {
61- /// An error occurred in the fork choice state.
62- #[ error( "Fork choice state error: {0}" ) ]
63- FcsError ( #[ from] FcsError ) ,
64- /// An error occurred in the transport layer.
65- #[ error( "Transport error: {0}" ) ]
66- TransportError ( #[ from] scroll_alloy_provider:: ScrollEngineApiError ) ,
67- }
68-
69- impl EngineError {
70- /// Creates a new [`EngineError`] for a [`FcsError::NoUpdateProvided`].
71- pub const fn fcs_no_update_provided ( ) -> Self {
72- Self :: FcsError ( FcsError :: NoUpdateProvided )
73- }
74-
75- /// Creates a new [`EngineError`] for a [`FcsError::FinalizedBlockNumberNotIncreasing`].
76- pub const fn fcs_finalized_block_number_not_increasing ( ) -> Self {
77- Self :: FcsError ( FcsError :: FinalizedBlockNumberNotIncreasing )
78- }
79- }
0 commit comments