tests: update block_weight for 2021 scaling

the test was still performed with consensus rules from before
that change
This commit is contained in:
moneromooo-monero 2022-08-08 06:03:10 +00:00
parent b6a029f222
commit e0b3507c88
No known key found for this signature in database
GPG key ID: 686F07454D6CEFC3
2 changed files with 14 additions and 8 deletions

View file

@ -141,7 +141,7 @@ static uint32_t lcg()
static void test(test_t t, uint64_t blocks)
{
PREFIX(10);
PREFIX(HF_VERSION_2021_SCALING);
for (uint64_t h = 0; h < LONG_TERM_BLOCK_WEIGHT_WINDOW; ++h)
{
@ -180,8 +180,8 @@ static void test(test_t t, uint64_t blocks)
}
uint64_t ltw = bc->get_next_long_term_block_weight(w);
cryptonote::block b;
b.major_version = 10;
b.minor_version = 10;
b.major_version = HF_VERSION_2021_SCALING;
b.minor_version = HF_VERSION_2021_SCALING;
bc->get_db().add_block(std::make_pair(std::move(b), ""), w, ltw, bc->get_db().height(), bc->get_db().height(), {});
if (!bc->update_next_cumulative_weight_limit())