diff options
author | luigi1111 <luigi1111w@gmail.com> | 2019-10-25 13:38:21 -0500 |
---|---|---|
committer | luigi1111 <luigi1111w@gmail.com> | 2019-10-25 13:38:21 -0500 |
commit | 960c2158010d30a375207310a36a7a942b9285d2 (patch) | |
tree | 46d25ec0db661fd62fd1a683dea3b1ecbf620089 /src/simplewallet/simplewallet.h | |
parent | Merge pull request #6002 (diff) | |
parent | simplewallet: add public_nodes command (diff) | |
download | monero-960c2158010d30a375207310a36a7a942b9285d2.tar.xz |
Merge pull request #5357
b3a9a4d add a quick early out to get_blocks.bin when up to date (moneromooo-monero)
2899379 daemon, wallet: new pay for RPC use system (moneromooo-monero)
ffa4602 simplewallet: add public_nodes command (moneromooo-monero)
Diffstat (limited to 'src/simplewallet/simplewallet.h')
-rw-r--r-- | src/simplewallet/simplewallet.h | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/src/simplewallet/simplewallet.h b/src/simplewallet/simplewallet.h index 47e08ca87..e8f96ad54 100644 --- a/src/simplewallet/simplewallet.h +++ b/src/simplewallet/simplewallet.h @@ -151,6 +151,9 @@ namespace cryptonote bool set_setup_background_mining(const std::vector<std::string> &args = std::vector<std::string>()); bool set_device_name(const std::vector<std::string> &args = std::vector<std::string>()); bool set_export_format(const std::vector<std::string> &args = std::vector<std::string>()); + bool set_persistent_rpc_client_id(const std::vector<std::string> &args = std::vector<std::string>()); + bool set_auto_mine_for_rpc_payment_threshold(const std::vector<std::string> &args = std::vector<std::string>()); + bool set_credits_target(const std::vector<std::string> &args = std::vector<std::string>()); bool help(const std::vector<std::string> &args = std::vector<std::string>()); bool start_mining(const std::vector<std::string> &args); bool stop_mining(const std::vector<std::string> &args); @@ -250,7 +253,11 @@ namespace cryptonote bool thaw(const std::vector<std::string>& args); bool frozen(const std::vector<std::string>& args); bool lock(const std::vector<std::string>& args); + bool rpc_payment_info(const std::vector<std::string> &args); + bool start_mining_for_rpc(const std::vector<std::string> &args); + bool stop_mining_for_rpc(const std::vector<std::string> &args); bool net_stats(const std::vector<std::string>& args); + bool public_nodes(const std::vector<std::string>& args); bool welcome(const std::vector<std::string>& args); bool version(const std::vector<std::string>& args); bool on_unknown_command(const std::vector<std::string>& args); @@ -325,6 +332,11 @@ namespace cryptonote bool check_inactivity(); bool check_refresh(); bool check_mms(); + bool check_rpc_payment(); + + void handle_transfer_exception(const std::exception_ptr &e, bool trusted_daemon); + + bool check_daemon_rpc_prices(const std::string &daemon_url, uint32_t &actual_cph, uint32_t &claimed_cph); //----------------- i_wallet2_callback --------------------- virtual void on_new_block(uint64_t height, const cryptonote::block& block); @@ -439,7 +451,17 @@ namespace cryptonote epee::math_helper::once_a_time_seconds<1> m_inactivity_checker; epee::math_helper::once_a_time_seconds<90> m_refresh_checker; epee::math_helper::once_a_time_seconds<90> m_mms_checker; + epee::math_helper::once_a_time_seconds<90> m_rpc_payment_checker; + std::atomic<bool> m_need_payment; + boost::posix_time::ptime m_last_rpc_payment_mining_time; + bool m_rpc_payment_mining_requested; + bool m_daemon_rpc_payment_message_displayed; + float m_rpc_payment_hash_rate; + std::atomic<bool> m_suspend_rpc_payment_mining; + + std::unordered_map<std::string, uint32_t> m_claimed_cph; + // MMS mms::message_store& get_message_store() const { return m_wallet->get_message_store(); }; mms::multisig_wallet_state get_multisig_wallet_state() const { return m_wallet->get_multisig_wallet_state(); }; |