diff options
author | TheCharlatan <seb.kung@gmail.com> | 2020-08-02 15:54:29 +0000 |
---|---|---|
committer | moneromooo-monero <moneromooo-monero@users.noreply.github.com> | 2020-09-15 11:40:31 +0000 |
commit | 80e535c95a3e7b0c548ad996a777d6d026e93f6a (patch) | |
tree | 82fccb41e3d253e61cd0f76d87768df669c434d0 /src/rpc | |
parent | blockchain: deterministic UNIX time unlock checks (diff) | |
download | monero-80e535c95a3e7b0c548ad996a777d6d026e93f6a.tar.xz |
wallet2: adapt to deterministic unlock time
Diffstat (limited to 'src/rpc')
-rw-r--r-- | src/rpc/core_rpc_server.cpp | 2 | ||||
-rw-r--r-- | src/rpc/core_rpc_server_commands_defs.h | 4 | ||||
-rw-r--r-- | src/rpc/daemon_handler.cpp | 1 | ||||
-rw-r--r-- | src/rpc/message_data_structs.h | 1 |
4 files changed, 7 insertions, 1 deletions
diff --git a/src/rpc/core_rpc_server.cpp b/src/rpc/core_rpc_server.cpp index 74d0cf450..a50c70418 100644 --- a/src/rpc/core_rpc_server.cpp +++ b/src/rpc/core_rpc_server.cpp @@ -461,6 +461,8 @@ namespace cryptonote res.cumulative_difficulty, res.wide_cumulative_difficulty, res.cumulative_difficulty_top64); res.block_size_limit = res.block_weight_limit = m_core.get_blockchain_storage().get_current_cumulative_block_weight_limit(); res.block_size_median = res.block_weight_median = m_core.get_blockchain_storage().get_current_cumulative_block_weight_median(); + res.adjusted_time = m_core.get_blockchain_storage().get_adjusted_time(res.height); + res.start_time = restricted ? 0 : (uint64_t)m_core.get_start_time(); res.free_space = restricted ? std::numeric_limits<uint64_t>::max() : m_core.get_free_space(); res.offline = m_core.offline(); diff --git a/src/rpc/core_rpc_server_commands_defs.h b/src/rpc/core_rpc_server_commands_defs.h index 09cd67d7d..8748b0540 100644 --- a/src/rpc/core_rpc_server_commands_defs.h +++ b/src/rpc/core_rpc_server_commands_defs.h @@ -88,7 +88,7 @@ namespace cryptonote // advance which version they will stop working with // Don't go over 32767 for any of these #define CORE_RPC_VERSION_MAJOR 3 -#define CORE_RPC_VERSION_MINOR 1 +#define CORE_RPC_VERSION_MINOR 2 #define MAKE_CORE_RPC_VERSION(major,minor) (((major)<<16)|(minor)) #define CORE_RPC_VERSION MAKE_CORE_RPC_VERSION(CORE_RPC_VERSION_MAJOR, CORE_RPC_VERSION_MINOR) @@ -675,6 +675,7 @@ namespace cryptonote uint64_t block_weight_limit; uint64_t block_size_median; uint64_t block_weight_median; + uint64_t adjusted_time; uint64_t start_time; uint64_t free_space; bool offline; @@ -713,6 +714,7 @@ namespace cryptonote KV_SERIALIZE_OPT(block_weight_limit, (uint64_t)0) KV_SERIALIZE(block_size_median) KV_SERIALIZE_OPT(block_weight_median, (uint64_t)0) + KV_SERIALIZE(adjusted_time) KV_SERIALIZE(start_time) KV_SERIALIZE(free_space) KV_SERIALIZE(offline) diff --git a/src/rpc/daemon_handler.cpp b/src/rpc/daemon_handler.cpp index 248c54afb..e256322cb 100644 --- a/src/rpc/daemon_handler.cpp +++ b/src/rpc/daemon_handler.cpp @@ -538,6 +538,7 @@ namespace rpc res.info.cumulative_difficulty = (res.info.wide_cumulative_difficulty & 0xffffffffffffffff).convert_to<uint64_t>(); res.info.block_size_limit = res.info.block_weight_limit = m_core.get_blockchain_storage().get_current_cumulative_block_weight_limit(); res.info.block_size_median = res.info.block_weight_median = m_core.get_blockchain_storage().get_current_cumulative_block_weight_median(); + res.info.adjusted_time = m_core.get_blockchain_storage().get_adjusted_time(res.info.height); res.info.start_time = (uint64_t)m_core.get_start_time(); res.info.version = MONERO_VERSION; diff --git a/src/rpc/message_data_structs.h b/src/rpc/message_data_structs.h index 085148d8a..86424653f 100644 --- a/src/rpc/message_data_structs.h +++ b/src/rpc/message_data_structs.h @@ -196,6 +196,7 @@ namespace rpc uint64_t block_size_limit; uint64_t block_weight_limit; uint64_t block_size_median; + uint64_t adjusted_time; uint64_t block_weight_median; uint64_t start_time; std::string version; |