From 63d73e758240c9d22c1d57c16aedf99cde89cd5e Mon Sep 17 00:00:00 2001 From: Matt Corallo Date: Mon, 22 Aug 2022 03:24:27 +0000 Subject: [PATCH] Correct error-matching in downloader --- src/downloader.rs | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) 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 })?; -- 2.39.5