print_coinbase_tx_sum now supports 128 bits sums

The tail emission will bring the total above 64 bits
This commit is contained in:
moneromooo-monero 2019-12-09 14:56:44 +00:00
parent 411f1b0ee3
commit 987c3139dc
No known key found for this signature in database
GPG key ID: 686F07454D6CEFC3
8 changed files with 50 additions and 16 deletions

View file

@ -203,10 +203,15 @@ class BlockchainTest():
res_sum = daemon.get_coinbase_tx_sum(i, 1)
res_header = daemon.getblockheaderbyheight(i)
assert res_sum.emission_amount == res_header.block_header.reward
assert res_sum.emission_amount_top64 == 0
assert res_sum.emission_amount == int(res_sum.wide_emission_amount, 16)
assert res_sum.fee_amount == int(res_sum.wide_fee_amount, 16)
res = daemon.get_coinbase_tx_sum(0, 1)
assert res.emission_amount == 17592186044415
assert res.emission_amount_top64 == 0
assert res.fee_amount == 0
assert res.fee_amount_top64 == 0
sum_blocks = height + nblocks - 1
res = daemon.get_coinbase_tx_sum(0, sum_blocks)
extrapolated = 17592186044415 + 17592186044415 * 2 * (sum_blocks - 1)