Merge pull request #3098 from arik-so/arik/gossip-v2-parsing
[rust-lightning] / lightning-rapid-gossip-sync / src / lib.rs
index 68c451a6372a4d30d63fd39c5a978a54b15c2680..ecc52553038ed763fd228851f5816e91327b6087 100644 (file)
@@ -92,12 +92,18 @@ pub enum GraphSyncError {
        LightningError(LightningError),
 }
 
-impl From<lightning::io::Error> for GraphSyncError {
-       fn from(error: lightning::io::Error) -> Self {
+impl From<io::Error> for GraphSyncError {
+       fn from(error: io::Error) -> Self {
                Self::DecodeError(DecodeError::Io(error.kind()))
        }
 }
 
+impl From<bitcoin::secp256k1::Error> for GraphSyncError {
+       fn from(_: bitcoin::secp256k1::Error) -> Self {
+               Self::DecodeError(DecodeError::InvalidValue)
+       }
+}
+
 impl From<DecodeError> for GraphSyncError {
        fn from(error: DecodeError) -> Self {
                Self::DecodeError(error)