From: Matt Corallo Date: Mon, 22 Aug 2022 03:24:27 +0000 (+0000) Subject: Correct error-matching in downloader X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=commitdiff_plain;h=63d73e758240c9d22c1d57c16aedf99cde89cd5e;p=rapid-gossip-sync-server Correct error-matching in downloader --- diff --git a/src/downloader.rs b/src/downloader.rs index 3e6f91e..6bfaa14 100644 --- a/src/downloader.rs +++ b/src/downloader.rs @@ -60,11 +60,9 @@ impl RoutingMessageHandler for GossipRouter { let mut counter = self.counter.write().unwrap(); let output_value = self.native_router.handle_channel_announcement(msg).map_err(|error| { - let error_string = format!("{:?}", error); - if error_string.contains("announced on an unknown chain"){ - return error; + if error.err.contains("didn't match on-chain script") { + counter.channel_announcements_with_mismatched_scripts += 1; } - counter.channel_announcements_with_mismatched_scripts += 1; error })?;