4 /// An error that possibly needs to be handled by the user.
6 /// A transaction sync failed and needs to be retried eventually.
10 impl std::error::Error for TxSyncError {}
12 impl fmt::Display for TxSyncError {
13 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
15 Self::Failed => write!(f, "Failed to conduct transaction sync."),
21 pub(crate) enum InternalError {
22 /// A transaction sync failed and needs to be retried eventually.
24 /// An inconsistency was encountered during transaction sync.
28 impl fmt::Display for InternalError {
29 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
31 Self::Failed => write!(f, "Failed to conduct transaction sync."),
32 Self::Inconsistency => {
33 write!(f, "Encountered an inconsistency during transaction sync.")
39 impl std::error::Error for InternalError {}
41 impl From<InternalError> for TxSyncError {
42 fn from(_e: InternalError) -> Self {
47 #[cfg(any(feature = "esplora-blocking", feature = "esplora-async"))]
48 impl From<esplora_client::Error> for TxSyncError {
49 fn from(_e: esplora_client::Error) -> Self {
54 #[cfg(any(feature = "esplora-blocking", feature = "esplora-async"))]
55 impl From<esplora_client::Error> for InternalError {
56 fn from(_e: esplora_client::Error) -> Self {
61 #[cfg(feature = "electrum")]
62 impl From<electrum_client::Error> for InternalError {
63 fn from(_e: electrum_client::Error) -> Self {
68 #[cfg(feature = "electrum")]
69 impl From<electrum_client::Error> for TxSyncError {
70 fn from(_e: electrum_client::Error) -> Self {