]> git.bitcoin.ninja Git - dnsseed-rust/commitdiff
Send trusted peer a sendheaders
authorMatt Corallo <git@bluematt.me>
Tue, 21 May 2019 14:53:29 +0000 (10:53 -0400)
committerMatt Corallo <git@bluematt.me>
Tue, 21 May 2019 14:53:29 +0000 (10:53 -0400)
src/main.rs

index 3086731dc96f71946fc7f59b5cf8c806070be185..2c4acee6b7e393ca65278d318e414c2242b3d5ab 100644 (file)
@@ -230,6 +230,9 @@ fn make_trusted_conn(trusted_sockaddr: SocketAddr) {
                                        starting_height = ver.start_height;
                                },
                                NetworkMessage::Verack => {
+                                       if let Err(_) = trusted_write.try_send(NetworkMessage::SendHeaders) {
+                                               return future::err(());
+                                       }
                                        if let Err(_) = trusted_write.try_send(NetworkMessage::GetHeaders(GetHeadersMessage {
                                                version: 70015,
                                                locator_hashes: vec![unsafe { HIGHEST_HEADER.as_ref().unwrap() }.lock().unwrap().0.clone()],