forked from lthn/blockchain
added hardforks infor to rpc get_info
This commit is contained in:
parent
01adc5087c
commit
e20f419adc
2 changed files with 9 additions and 0 deletions
|
|
@ -117,6 +117,13 @@ namespace currency
|
|||
res.default_fee = m_core.get_blockchain_storage().get_core_runtime_config().tx_default_fee;
|
||||
res.minimum_fee = m_core.get_blockchain_storage().get_core_runtime_config().tx_pool_min_fee;
|
||||
|
||||
auto & hf = m_core.get_blockchain_storage().get_core_runtime_config().hard_forks.m_height_the_hardfork_n_active_after;
|
||||
res.is_hardfok_active.resize(hf.size());
|
||||
for (size_t i = 0; i != hf.size(); i++)
|
||||
{
|
||||
res.is_hardfok_active[i] = m_core.get_blockchain_storage().is_hardfork_active(i);
|
||||
}
|
||||
|
||||
//conditional values
|
||||
if (req.flags&COMMAND_RPC_GET_INFO_FLAG_NET_TIME_DELTA_MEDIAN)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -793,6 +793,7 @@ namespace currency
|
|||
uint64_t minimum_fee;
|
||||
uint64_t last_block_timestamp;
|
||||
std::string last_block_hash;
|
||||
std::vector<bool> is_hardfok_active;
|
||||
//market
|
||||
uint64_t offers_count;
|
||||
|
||||
|
|
@ -843,6 +844,7 @@ namespace currency
|
|||
KV_SERIALIZE(minimum_fee)
|
||||
KV_SERIALIZE(last_block_timestamp)
|
||||
KV_SERIALIZE(last_block_hash)
|
||||
KV_SERIALIZE(is_hardfok_active)
|
||||
KV_SERIALIZE(offers_count)
|
||||
END_KV_SERIALIZE_MAP()
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue