Allow the wallet to access hard fork information

And make it change behavior slightly when close/after first hard fork
This commit is contained in:
moneromooo-monero
2015-12-19 14:52:30 +00:00
parent 760331b427
commit 8ea7af1ba3
8 changed files with 63 additions and 8 deletions

View File

@@ -890,7 +890,7 @@ namespace cryptonote
const Blockchain &blockchain = m_core.get_blockchain_storage();
uint8_t version = req.version > 0 ? req.version : blockchain.get_ideal_hard_fork_version();
res.version = blockchain.get_current_hard_fork_version();
res.enabled = blockchain.get_hard_fork_voting_info(version, res.window, res.votes, res.threshold, res.voting);
res.enabled = blockchain.get_hard_fork_voting_info(version, res.window, res.votes, res.threshold, res.earliest_height, res.voting);
res.state = blockchain.get_hard_fork_state();
res.status = CORE_RPC_STATUS_OK;
return true;

View File

@@ -875,6 +875,7 @@ namespace cryptonote
uint32_t threshold;
uint8_t voting;
uint32_t state;
uint64_t earliest_height;
std::string status;
BEGIN_KV_SERIALIZE_MAP()
@@ -885,6 +886,7 @@ namespace cryptonote
KV_SERIALIZE(threshold)
KV_SERIALIZE(voting)
KV_SERIALIZE(state)
KV_SERIALIZE(earliest_height)
KV_SERIALIZE(status)
END_KV_SERIALIZE_MAP()
};