Skip to content

Commit bfc9592

Browse files
committed
Parse v2 gossip.
1 parent 2701bc5 commit bfc9592

File tree

2 files changed

+316
-18
lines changed

2 files changed

+316
-18
lines changed

lightning-rapid-gossip-sync/src/lib.rs

+8-2
Original file line numberDiff line numberDiff line change
@@ -92,12 +92,18 @@ pub enum GraphSyncError {
9292
LightningError(LightningError),
9393
}
9494

95-
impl From<lightning::io::Error> for GraphSyncError {
96-
fn from(error: lightning::io::Error) -> Self {
95+
impl From<io::Error> for GraphSyncError {
96+
fn from(error: io::Error) -> Self {
9797
Self::DecodeError(DecodeError::Io(error.kind()))
9898
}
9999
}
100100

101+
impl From<bitcoin::secp256k1::Error> for GraphSyncError {
102+
fn from(_: bitcoin::secp256k1::Error) -> Self {
103+
Self::DecodeError(DecodeError::InvalidValue)
104+
}
105+
}
106+
101107
impl From<DecodeError> for GraphSyncError {
102108
fn from(error: DecodeError) -> Self {
103109
Self::DecodeError(error)

0 commit comments

Comments
 (0)