]> git.bitcoin.ninja Git - rust-lightning/commitdiff
Set the `dns_resolution` feature in `OMDomainResolver` 2024-07-human-readable-names-resolution
authorMatt Corallo <git@bluematt.me>
Wed, 2 Oct 2024 18:23:31 +0000 (18:23 +0000)
committerMatt Corallo <git@bluematt.me>
Thu, 10 Oct 2024 23:08:22 +0000 (23:08 +0000)
`OMDomainResolver` actually does support building DNSSECProofs, so
should be setting the `dns_resolution` `NodeFeature` flag.

lightning-dns-resolver/Cargo.toml
lightning-dns-resolver/src/lib.rs

index 9791856367a2b68d15940c64d65c50864aa5a0f4..46ea7e8aebe6defeff84219f8ee5f16573984f96 100644 (file)
@@ -5,6 +5,7 @@ edition = "2021"
 
 [dependencies]
 lightning = { version = "0.0.124-rc1", path = "../lightning", default-features = false }
+lightning-types = { version = "0.1", path = "../lightning-types", default-features = false }
 dnssec-prover = { version = "0.6", default-features = false, features = [ "std", "tokio" ] }
 tokio = { version = "1.0", default-features = false, features = ["rt"] }
 
index f06b8abc31236d020c28cd20f78eeacda9717447..cd8db46034556429e641fc94783930abd221531a 100644 (file)
@@ -21,6 +21,8 @@ use lightning::onion_message::messenger::{
        MessageSendInstructions, Responder, ResponseInstruction,
 };
 
+use lightning_types::features::NodeFeatures;
+
 #[cfg(not(any(target_pointer_width = "32", target_pointer_width = "64")))]
 const WE_REQUIRE_32_OR_64_BIT_USIZE: u8 = 424242;
 
@@ -107,6 +109,12 @@ where
                None
        }
 
+       fn provided_node_features(&self) -> NodeFeatures {
+               let mut features = NodeFeatures::empty();
+               features.set_dns_resolution_optional();
+               features
+       }
+
        fn release_pending_messages(&self) -> Vec<(DNSResolverMessage, MessageSendInstructions)> {
                core::mem::take(&mut *self.state.pending_replies.lock().unwrap())
        }