pub fn cumulative_generated_coins(
block_height: &BlockHeight,
table_block_infos: &impl DatabaseRo<BlockInfos>,
) -> DbResult<u64>Expand description
Check how many cumulative generated coins there have been until a certain BlockHeight.
This returns the total amount of Monero generated up to block_height
(including the block itself) in atomic units.
For example:
- on the genesis block
0, this returns the amount block0generated - on the next block
1, this returns the amount block0and1generated
If no blocks have been added and block_height == 0
(i.e., the cumulative generated coins before genesis block is being calculated),
this returns Ok(0).
§Errors
This function returns cuprate_database::RuntimeError::KeyNotFound if the input (if applicable) doesn’t exist or other RuntimeError’s on database errors.