mirror of
https://github.com/monero-project/monero.git
synced 2026-01-30 00:05:02 +01:00
wallet2: adapt to deterministic unlock time
This commit is contained in:
committed by
moneromooo-monero
parent
4971219c2c
commit
80e535c95a
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user