diff options
author | Riccardo Spagni <ric@spagni.net> | 2017-08-07 15:09:45 +0200 |
---|---|---|
committer | Riccardo Spagni <ric@spagni.net> | 2017-08-07 15:09:45 +0200 |
commit | f5be5b7e7be454291f6bb1cd04d95c4587c64992 (patch) | |
tree | 263eba5341ca6fa45f7aacd630327d9cb3f23e64 /src/cryptonote_basic/cryptonote_basic_impl.h | |
parent | Merge pull request #2206 (diff) | |
parent | Move OpenAlias console input back from libs (diff) | |
download | monero-f5be5b7e7be454291f6bb1cd04d95c4587c64992.tar.xz |
Merge pull request #2210
cb0b5594 Move OpenAlias console input back from libs (moneromooo-monero)
Diffstat (limited to 'src/cryptonote_basic/cryptonote_basic_impl.h')
-rw-r--r-- | src/cryptonote_basic/cryptonote_basic_impl.h | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/src/cryptonote_basic/cryptonote_basic_impl.h b/src/cryptonote_basic/cryptonote_basic_impl.h index 14c03ac4c..9838fcb47 100644 --- a/src/cryptonote_basic/cryptonote_basic_impl.h +++ b/src/cryptonote_basic/cryptonote_basic_impl.h @@ -67,6 +67,15 @@ namespace cryptonote { }; #pragma pack (pop) + namespace + { + std::string return_first_address(const std::string &url, const std::vector<std::string> &addresses, bool dnssec_valid) + { + if (addresses.empty()) + return {}; + return addresses[0]; + } + } /************************************************************************/ /* Cryptonote helper functions */ @@ -109,14 +118,14 @@ namespace cryptonote { , crypto::hash8& payment_id , bool testnet , const std::string& str_or_url - , bool cli_confirm = true + , std::function<std::string(const std::string&, const std::vector<std::string>&, bool)> dns_confirm = return_first_address ); bool get_account_address_from_str_or_url( cryptonote::account_public_address& address , bool testnet , const std::string& str_or_url - , bool cli_confirm = true + , std::function<std::string(const std::string&, const std::vector<std::string>&, bool)> dns_confirm = return_first_address ); bool is_coinbase(const transaction& tx); |