enforce claiming maximum coinbase amount

Claiming a slightly lesser amount does not yield the size gains
that were seen pre rct, so this closes a fingerprinting vector
This commit is contained in:
moneromooo-monero 2020-08-14 21:12:11 +00:00
parent 5d850dde99
commit 844fb4e940
No known key found for this signature in database
GPG key ID: 686F07454D6CEFC3
5 changed files with 33 additions and 2 deletions

View file

@ -655,3 +655,19 @@ bool gen_block_late_v1_coinbase_tx::generate(std::vector<test_event_entry>& even
return true;
}
bool gen_block_low_coinbase::generate(std::vector<test_event_entry>& events) const
{
BLOCK_VALIDATION_INIT_GENERATE();
block blk_1;
std::vector<size_t> block_weights;
generator.construct_block(blk_1, cryptonote::get_block_height(blk_0) + 1, cryptonote::get_block_hash(blk_0),
miner_account, blk_0.timestamp + DIFFICULTY_TARGET_V2, COIN + generator.get_already_generated_coins(cryptonote::get_block_hash(blk_0)),
block_weights, {}, HF_VERSION_EXACT_COINBASE);
events.push_back(blk_1);
DO_CALLBACK(events, "check_block_purged");
return true;
}