Skip to content

Commit

Permalink
Set the dns_resolution feature in OMDomainResolver
Browse files Browse the repository at this point in the history
`OMDomainResolver` actually does support building DNSSECProofs, so
should be setting the `dns_resolution` `NodeFeature` flag.
  • Loading branch information
TheBlueMatt committed Nov 7, 2024
1 parent b6e588a commit d549afc
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
1 change: 1 addition & 0 deletions lightning-dns-resolver/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ edition = "2021"

[dependencies]
lightning = { version = "0.0.124", 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"] }

Expand Down
8 changes: 8 additions & 0 deletions lightning-dns-resolver/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ use lightning::onion_message::messenger::{
MessageSendInstructions, Responder, ResponseInstruction,
};

use lightning_types::features::NodeFeatures;

use tokio::runtime::Handle;

#[cfg(not(any(target_pointer_width = "32", target_pointer_width = "64")))]
Expand Down Expand Up @@ -126,6 +128,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())
}
Expand Down

0 comments on commit d549afc

Please sign in to comment.