|
8 | 8 | use crate::chain::{ChainSource, DEFAULT_ESPLORA_SERVER_URL}; |
9 | 9 | use crate::config::{ |
10 | 10 | default_user_config, may_announce_channel, AnnounceError, Config, ElectrumSyncConfig, |
11 | | - EsploraSyncConfig, DEFAULT_LOG_FILENAME, DEFAULT_LOG_LEVEL, WALLET_KEYS_SEED_LEN, |
| 11 | + EsploraSyncConfig, HumanReadableNamesConfig, DEFAULT_LOG_FILENAME, DEFAULT_LOG_LEVEL, |
| 12 | + WALLET_KEYS_SEED_LEN, |
12 | 13 | }; |
13 | 14 |
|
14 | 15 | use crate::connection::ConnectionManager; |
@@ -464,15 +465,10 @@ impl NodeBuilder { |
464 | 465 | Ok(self) |
465 | 466 | } |
466 | 467 |
|
467 | | - /// Sets the default dns_resolvers to be used when sending payments to HRNs. |
468 | | - pub fn set_dns_resolvers( |
469 | | - &mut self, dns_resolvers_node_ids: Vec<PublicKey>, |
470 | | - ) -> Result<&mut Self, BuildError> { |
471 | | - if dns_resolvers_node_ids.is_empty() { |
472 | | - return Err(BuildError::DnsResolversEmpty); |
473 | | - } |
474 | | - self.config.dns_resolvers_node_ids = Some(dns_resolvers_node_ids); |
475 | | - Ok(self) |
| 468 | + /// Sets the default [`Config::hrn_config`] to be used when sending payments to HRNs. |
| 469 | + pub fn set_hrn_config(&mut self, hrn_config: HumanReadableNamesConfig) -> &mut Self { |
| 470 | + self.config.hrn_config = hrn_config; |
| 471 | + self |
476 | 472 | } |
477 | 473 |
|
478 | 474 | /// Builds a [`Node`] instance with a [`SqliteStore`] backend and according to the options |
@@ -856,11 +852,9 @@ impl ArcedNodeBuilder { |
856 | 852 | self.inner.write().unwrap().set_node_alias(node_alias).map(|_| ()) |
857 | 853 | } |
858 | 854 |
|
859 | | - /// Sets the default dns_resolvers to be used when sending payments to HRNs. |
860 | | - pub fn set_dns_resolvers( |
861 | | - &self, dns_resolvers_node_ids: Vec<PublicKey>, |
862 | | - ) -> Result<(), BuildError> { |
863 | | - self.inner.write().unwrap().set_dns_resolvers(dns_resolvers_node_ids).map(|_| ()) |
| 855 | + /// Sets the default [`Config::hrn_config`] to be used when sending payments to HRNs. |
| 856 | + pub fn set_hrn_config(&self, hrn_config: HumanReadableNamesConfig) { |
| 857 | + self.inner.write().unwrap().set_hrn_config(hrn_config); |
864 | 858 | } |
865 | 859 |
|
866 | 860 | /// Builds a [`Node`] instance with a [`SqliteStore`] backend and according to the options |
|
0 commit comments