]> git.bitcoin.ninja Git - dnsseed-rust/commitdiff
Fix printing Good on not-Good
authorMatt Corallo <git@bluematt.me>
Tue, 21 May 2019 03:59:35 +0000 (23:59 -0400)
committerMatt Corallo <git@bluematt.me>
Tue, 21 May 2019 06:09:42 +0000 (02:09 -0400)
src/main.rs

index 0f14333a75058b6f2a23e7cede3f6afb45e6778d..ae38a5bc3e6845fcf3a658812f49233339673873 100644 (file)
@@ -180,7 +180,7 @@ pub fn scan_node(scan_time: Instant, node: SocketAddr) {
                } else {
                        assert!(state_lock.fail_reason != AddressState::Good);
                        let old_state = store.set_node_state(node, state_lock.fail_reason, 0);
-                       if old_state != state_lock.fail_reason && state_lock.msg.0 != "" {
+                       if old_state != state_lock.fail_reason && state_lock.msg.0 != "" && state_lock.msg.1 {
                                printer.add_line(format!("Updating {} from {} to {}", node, old_state.to_str(), &state_lock.msg.0), state_lock.msg.1);
                        }
                }