@@ -20,7 +20,6 @@ use alloc::{
2020 string:: { String , ToString } ,
2121} ;
2222use bitcoin:: { absolute, psbt, Amount , BlockHash , Network , OutPoint , Sequence , Txid } ;
23- use chain:: local_chain:: CannotConnectError ;
2423use core:: fmt;
2524
2625/// The error type when loading a [`Wallet`] from a [`ChangeSet`].
@@ -128,38 +127,6 @@ impl From<LoadMismatch> for LoadError {
128127 }
129128}
130129
131- /// An error that may occur when applying a block to [`Wallet`].
132- #[ derive( Debug ) ]
133- pub enum ApplyBlockError {
134- /// Occurs when the update chain cannot connect with original chain.
135- CannotConnect ( CannotConnectError ) ,
136- /// Occurs when the `connected_to` hash does not match the hash derived from `block`.
137- UnexpectedConnectedToHash {
138- /// Block hash of `connected_to`.
139- connected_to_hash : BlockHash ,
140- /// Expected block hash of `connected_to`, as derived from `block`.
141- expected_hash : BlockHash ,
142- } ,
143- }
144-
145- impl fmt:: Display for ApplyBlockError {
146- fn fmt ( & self , f : & mut fmt:: Formatter < ' _ > ) -> fmt:: Result {
147- match self {
148- ApplyBlockError :: CannotConnect ( err) => err. fmt ( f) ,
149- ApplyBlockError :: UnexpectedConnectedToHash {
150- expected_hash : block_hash,
151- connected_to_hash : checkpoint_hash,
152- } => write ! (
153- f,
154- "`connected_to` hash {checkpoint_hash} differs from the expected hash {block_hash} (which is derived from `block`)"
155- ) ,
156- }
157- }
158- }
159-
160- #[ cfg( feature = "std" ) ]
161- impl std:: error:: Error for ApplyBlockError { }
162-
163130/// Errors returned by miniscript when updating inconsistent PSBTs
164131#[ derive( Debug , Clone ) ]
165132pub enum MiniscriptPsbtError {
0 commit comments