diff --git a/CMakeLists.txt b/CMakeLists.txt index baccf1751..b569701e0 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -208,7 +208,6 @@ if(NOT MANUAL_SUBMODULES) message(STATUS "Checking submodules") check_submodule(external/miniupnp) - check_submodule(external/unbound) check_submodule(external/rapidjson) check_submodule(external/trezor-common) check_submodule(external/RandomWOW) @@ -474,8 +473,6 @@ else() endif() # Final setup for libunbound -include_directories(${UNBOUND_INCLUDE}) -link_directories(${UNBOUND_LIBRARY_DIRS}) # Final setup for easylogging++ include_directories(${EASYLOGGING_INCLUDE}) diff --git a/external/CMakeLists.txt b/external/CMakeLists.txt index 6549236af..32d8db0bb 100644 --- a/external/CMakeLists.txt +++ b/external/CMakeLists.txt @@ -71,7 +71,8 @@ else() set(UPNP_LIBRARIES "libminiupnpc-static" PARENT_SCOPE) endif() -find_package(Unbound) +set(UNBOUND_INCLUDE_DIR unbound_dummy_include_dir) +set(UNBOUND_LIBRARIES unbound_dummy_libraries) if(NOT UNBOUND_INCLUDE_DIR OR STATIC) # NOTE: If STATIC is true, CMAKE_FIND_LIBRARY_SUFFIXES has been reordered. diff --git a/src/checkpoints/checkpoints.cpp b/src/checkpoints/checkpoints.cpp index 29961ae03..0dcf5a9a9 100644 --- a/src/checkpoints/checkpoints.cpp +++ b/src/checkpoints/checkpoints.cpp @@ -30,7 +30,6 @@ #include "checkpoints.h" -#include "common/dns_utils.h" #include "string_tools.h" #include "storages/portable_storage_template_helper.h" // epee json include #include "serialization/keyvalue_serialization.h" @@ -279,7 +278,6 @@ namespace cryptonote static const std::vector stagenet_dns_urls = { }; - if (!tools::dns_utils::load_txt_records_from_dns(records, nettype == TESTNET ? testnet_dns_urls : nettype == STAGENET ? stagenet_dns_urls : dns_urls)) return true; // why true ? for (const auto& record : records) diff --git a/src/common/CMakeLists.txt b/src/common/CMakeLists.txt index f06737b31..9f71f6505 100644 --- a/src/common/CMakeLists.txt +++ b/src/common/CMakeLists.txt @@ -31,7 +31,6 @@ include_directories(SYSTEM ${OPENSSL_INCLUDE_DIR}) set(common_sources base58.cpp command_line.cpp - dns_utils.cpp download.cpp error.cpp expect.cpp @@ -64,7 +63,6 @@ set(common_private_headers boost_serialization_helper.h command_line.h common_fwd.h - dns_utils.h download.h error.h expect.h @@ -98,7 +96,6 @@ monero_add_library(common target_link_libraries(common PUBLIC cncrypto - ${UNBOUND_LIBRARY} ${LIBUNWIND_LIBRARIES} ${Boost_DATE_TIME_LIBRARY} ${Boost_FILESYSTEM_LIBRARY} diff --git a/src/common/updates.cpp b/src/common/updates.cpp index bf3d3e6e5..b9b78bf82 100644 --- a/src/common/updates.cpp +++ b/src/common/updates.cpp @@ -29,7 +29,6 @@ #include #include "misc_log_ex.h" #include "util.h" -#include "dns_utils.h" #include "updates.h" #undef MONERO_DEFAULT_LOG_CATEGORY @@ -48,7 +47,6 @@ namespace tools static const std::vector dns_urls = { }; - if (!tools::dns_utils::load_txt_records_from_dns(records, dns_urls)) return false; for (const auto& record : records) diff --git a/src/common/util.cpp b/src/common/util.cpp index 747235646..802fe0e8f 100644 --- a/src/common/util.cpp +++ b/src/common/util.cpp @@ -54,7 +54,6 @@ #include #endif -#include "unbound.h" #include "include_base_utils.h" #include "file_io_utils.h" @@ -673,6 +672,7 @@ std::string get_nix_version_display_string() return std::error_code(code, std::system_category()); } + /* static bool unbound_built_with_threads() { ub_ctx *ctx = ub_ctx_create(); @@ -687,6 +687,7 @@ std::string get_nix_version_display_string() MINFO("libunbound was built " << (with_threads ? "with" : "without") << " threads"); return with_threads; } + */ bool sanitize_locale() { @@ -796,9 +797,6 @@ std::string get_nix_version_display_string() OPENSSL_init_ssl(0, NULL); #endif - if (!unbound_built_with_threads()) - MCLOG_RED(el::Level::Warning, "global", "libunbound was not built with threads enabled - crashes may occur"); - return true; } void set_strict_default_file_permissions(bool strict) diff --git a/src/cryptonote_basic/cryptonote_basic_impl.cpp b/src/cryptonote_basic/cryptonote_basic_impl.cpp index 79a809138..d99f06a44 100644 --- a/src/cryptonote_basic/cryptonote_basic_impl.cpp +++ b/src/cryptonote_basic/cryptonote_basic_impl.cpp @@ -41,7 +41,6 @@ using namespace epee; #include "common/base58.h" #include "crypto/hash.h" #include "int-util.h" -#include "common/dns_utils.h" #undef MONERO_DEFAULT_LOG_CATEGORY #define MONERO_DEFAULT_LOG_CATEGORY "cn" @@ -299,7 +298,7 @@ namespace cryptonote { if (get_account_address_from_str(info, nettype, str_or_url)) return true; bool dnssec_valid; - std::string address_str = tools::dns_utils::get_account_address_as_str_from_url(str_or_url, dnssec_valid, dns_confirm); + std::string address_str; return !address_str.empty() && get_account_address_from_str(info, nettype, address_str); } diff --git a/src/daemon/command_parser_executor.cpp b/src/daemon/command_parser_executor.cpp index c78a9ac2f..5c804dcc7 100644 --- a/src/daemon/command_parser_executor.cpp +++ b/src/daemon/command_parser_executor.cpp @@ -26,7 +26,6 @@ // STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF // THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -#include "common/dns_utils.h" #include "common/command_line.h" #include "daemon/command_parser_executor.h" @@ -345,8 +344,7 @@ bool t_command_parser_executor::start_mining(const std::vector& arg if(!cryptonote::get_account_address_from_str(info, cryptonote::STAGENET, args.front())) { bool dnssec_valid; - std::string address_str = tools::dns_utils::get_account_address_as_str_from_url(args.front(), dnssec_valid, - [](const std::string &url, const std::vector &addresses, bool dnssec_valid){return addresses[0];}); + std::string address_str; if(!cryptonote::get_account_address_from_str(info, cryptonote::MAINNET, address_str)) { if(!cryptonote::get_account_address_from_str(info, cryptonote::TESTNET, address_str)) diff --git a/src/p2p/net_node.inl b/src/p2p/net_node.inl index e07e97982..a28664f0c 100644 --- a/src/p2p/net_node.inl +++ b/src/p2p/net_node.inl @@ -688,7 +688,6 @@ namespace nodetool try { - addr_list = tools::DNSResolver::instance().get_ipv4(addr_str, avail, valid); MDEBUG("dns_threads[" << result_index << "] DNS resolve done"); boost::this_thread::interruption_point(); } diff --git a/src/simplewallet/simplewallet.cpp b/src/simplewallet/simplewallet.cpp index 882795071..cc67554f0 100644 --- a/src/simplewallet/simplewallet.cpp +++ b/src/simplewallet/simplewallet.cpp @@ -50,7 +50,6 @@ #include "common/i18n.h" #include "common/command_line.h" #include "common/util.h" -#include "common/dns_utils.h" #include "common/base58.h" #include "common/scoped_message_writer.h" #include "cryptonote_protocol/cryptonote_protocol_handler.h" diff --git a/src/wallet/api/wallet_manager.cpp b/src/wallet/api/wallet_manager.cpp index 44a184304..a622b168f 100644 --- a/src/wallet/api/wallet_manager.cpp +++ b/src/wallet/api/wallet_manager.cpp @@ -32,7 +32,6 @@ #include "wallet_manager.h" #include "wallet.h" #include "common_defines.h" -#include "common/dns_utils.h" #include "common/util.h" #include "common/updates.h" #include "version.h" @@ -336,7 +335,7 @@ bool WalletManagerImpl::stopMining() std::string WalletManagerImpl::resolveOpenAlias(const std::string &address, bool &dnssec_valid) const { - std::vector addresses = tools::dns_utils::addresses_from_url(address, dnssec_valid); + std::vector addresses; if (addresses.empty()) return ""; return addresses.front(); diff --git a/src/wallet/wallet2.cpp b/src/wallet/wallet2.cpp index 0eab31bd3..9159ea46c 100644 --- a/src/wallet/wallet2.cpp +++ b/src/wallet/wallet2.cpp @@ -75,7 +75,6 @@ using namespace epee; #include "memwipe.h" #include "common/base58.h" #include "common/combinator.h" -#include "common/dns_utils.h" #include "common/notify.h" #include "common/perf_timer.h" #include "ringct/rctSigs.h" @@ -13443,7 +13442,7 @@ uint64_t wallet2::get_segregation_fork_height() const const uint64_t current_height = get_blockchain_current_height(); uint64_t best_diff = std::numeric_limits::max(), best_height = 0; std::vector records; - if (tools::dns_utils::load_txt_records_from_dns(records, dns_urls)) + if (false) { for (const auto& record : records) {