@@ -19,8 +19,6 @@ pub enum LdkLiteError {
19
19
FundingTxNonWitnessOuputSpend ,
20
20
/// The funding transaction could not be finalized.
21
21
FundingTxNotFinalized ,
22
- /// TODO
23
- ChainStateMismatch ,
24
22
/// A network connection has been closed.
25
23
ConnectionFailed ,
26
24
/// A given peer info could not be parsed.
@@ -54,12 +52,10 @@ impl fmt::Display for LdkLiteError {
54
52
LdkLiteError :: NotRunning => write ! ( f, "LDKLite is not running." ) ,
55
53
LdkLiteError :: FundingTxNonWitnessOuputSpend => write ! ( f, "an input of the funding transaction tried spending a non-SegWit output, which is insecure" ) ,
56
54
LdkLiteError :: FundingTxNotFinalized => write ! ( f, "the funding transaction could not be finalized" ) ,
57
- LdkLiteError :: ChainStateMismatch => write ! ( f, "ChainStateMismatch" ) ,
58
55
LdkLiteError :: ConnectionFailed => write ! ( f, "network connection closed" ) ,
59
56
LdkLiteError :: PeerInfoParse ( ref e) => write ! ( f, "given peer info could not be parsed: {}" , e) ,
60
57
LdkLiteError :: LdkDecode ( ref e) => write ! ( f, "LDK decode error: {}" , e) ,
61
58
LdkLiteError :: LdkApi ( ref e) => write ! ( f, "LDK API error: {:?}" , e) ,
62
- // TODO: print more sensible things based on the type of payment error
63
59
LdkLiteError :: LdkPayment ( ref e) => write ! ( f, "LDK payment error: {:?}" , e) ,
64
60
LdkLiteError :: LdkInvoiceCreation ( ref e) => write ! ( f, "LDK invoice sign or creation error: {:?}" , e) ,
65
61
LdkLiteError :: Bdk ( ref e) => write ! ( f, "BDK error: {}" , e) ,
@@ -102,15 +98,15 @@ impl From<bdk::Error> for LdkLiteError {
102
98
}
103
99
}
104
100
105
- impl From < bitcoin :: util :: bip32 :: Error > for LdkLiteError {
106
- fn from ( e : bitcoin :: util :: bip32 :: Error ) -> Self {
107
- Self :: Bip32 ( e )
101
+ impl From < bdk :: sled :: Error > for LdkLiteError {
102
+ fn from ( e : bdk :: sled :: Error ) -> Self {
103
+ Self :: Bdk ( bdk :: Error :: Sled ( e ) )
108
104
}
109
105
}
110
106
111
- impl From < bdk :: electrum_client :: Error > for LdkLiteError {
112
- fn from ( e : bdk :: electrum_client :: Error ) -> Self {
113
- Self :: Bdk ( bdk :: Error :: Electrum ( e ) )
107
+ impl From < bitcoin :: util :: bip32 :: Error > for LdkLiteError {
108
+ fn from ( e : bitcoin :: util :: bip32 :: Error ) -> Self {
109
+ Self :: Bip32 ( e )
114
110
}
115
111
}
116
112
0 commit comments