mirror of
https://github.com/monero-project/monero.git
synced 2025-01-28 18:56:31 +02:00
Add cumulative difficulty to RPC block headers
This commit is contained in:
parent
b8874670ab
commit
760c1e3890
@ -571,6 +571,7 @@ namespace cryptonote
|
|||||||
responce.difficulty = m_core.get_blockchain_storage().block_difficulty(height);
|
responce.difficulty = m_core.get_blockchain_storage().block_difficulty(height);
|
||||||
responce.reward = get_block_reward(blk);
|
responce.reward = get_block_reward(blk);
|
||||||
responce.tx_count = blk.tx_hashes.size();
|
responce.tx_count = blk.tx_hashes.size();
|
||||||
|
responce.cumulative_difficulty = m_core.get_blockchain_storage().block_cumulative_difficulty(height);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
//------------------------------------------------------------------------------------------------------------------------------
|
//------------------------------------------------------------------------------------------------------------------------------
|
||||||
|
@ -399,6 +399,7 @@ namespace cryptonote
|
|||||||
difficulty_type difficulty;
|
difficulty_type difficulty;
|
||||||
uint64_t reward;
|
uint64_t reward;
|
||||||
size_t tx_count;
|
size_t tx_count;
|
||||||
|
uint64_t cumulative_difficulty;
|
||||||
|
|
||||||
BEGIN_KV_SERIALIZE_MAP()
|
BEGIN_KV_SERIALIZE_MAP()
|
||||||
KV_SERIALIZE(major_version)
|
KV_SERIALIZE(major_version)
|
||||||
@ -413,6 +414,7 @@ namespace cryptonote
|
|||||||
KV_SERIALIZE(difficulty)
|
KV_SERIALIZE(difficulty)
|
||||||
KV_SERIALIZE(reward)
|
KV_SERIALIZE(reward)
|
||||||
KV_SERIALIZE(tx_count)
|
KV_SERIALIZE(tx_count)
|
||||||
|
KV_SERIALIZE(cumulative_difficulty)
|
||||||
END_KV_SERIALIZE_MAP()
|
END_KV_SERIALIZE_MAP()
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user