diff options
author | luigi1111 <luigi1111w@gmail.com> | 2020-09-15 19:55:03 -0500 |
---|---|---|
committer | luigi1111 <luigi1111w@gmail.com> | 2020-09-15 19:55:03 -0500 |
commit | ea587de300088635267007f7c775b30293fc6ea2 (patch) | |
tree | 82fccb41e3d253e61cd0f76d87768df669c434d0 /src/wallet/node_rpc_proxy.cpp | |
parent | Merge pull request #6815 (diff) | |
parent | wallet2: adapt to deterministic unlock time (diff) | |
download | monero-ea587de300088635267007f7c775b30293fc6ea2.tar.xz |
Merge pull request #6745
80e535c wallet2: adapt to deterministic unlock time (TheCharlatan)
4971219 blockchain: deterministic UNIX time unlock checks (moneromooo-monero)
Diffstat (limited to 'src/wallet/node_rpc_proxy.cpp')
-rw-r--r-- | src/wallet/node_rpc_proxy.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/wallet/node_rpc_proxy.cpp b/src/wallet/node_rpc_proxy.cpp index 95b8ce8bb..48a602bf3 100644 --- a/src/wallet/node_rpc_proxy.cpp +++ b/src/wallet/node_rpc_proxy.cpp @@ -72,6 +72,7 @@ void NodeRPCProxy::invalidate() m_rpc_version = 0; m_target_height = 0; m_block_weight_limit = 0; + m_adjusted_time = 0; m_get_info_time = 0; m_rpc_payment_info_time = 0; m_rpc_payment_seed_height = 0; @@ -131,6 +132,7 @@ boost::optional<std::string> NodeRPCProxy::get_info() m_height = resp_t.height; m_target_height = resp_t.target_height; m_block_weight_limit = resp_t.block_weight_limit ? resp_t.block_weight_limit : resp_t.block_size_limit; + m_adjusted_time = resp_t.adjusted_time; m_get_info_time = now; m_height_time = now; } @@ -171,6 +173,15 @@ boost::optional<std::string> NodeRPCProxy::get_block_weight_limit(uint64_t &bloc return boost::optional<std::string>(); } +boost::optional<std::string> NodeRPCProxy::get_adjusted_time(uint64_t &adjusted_time) +{ + auto res = get_info(); + if (res) + return res; + adjusted_time = m_adjusted_time; + return boost::optional<std::string>(); +} + boost::optional<std::string> NodeRPCProxy::get_earliest_height(uint8_t version, uint64_t &earliest_height) { if (m_offline) |