Skip to content

Commit

Permalink
Fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
pwojcikdev committed Mar 10, 2024
1 parent e62602c commit 83dfd27
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions nano/core_test/vote_processor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -131,10 +131,11 @@ TEST (vote_processor, weights)
auto & node (*system.nodes[0]);

// Create representatives of different weight levels
auto const total = nano::dev::constants.genesis_amount;
auto const level0 = total / 5000; // 0.02%
auto const level1 = total / 500; // 0.2%
auto const level2 = total / 50; // 2%
// FIXME: Using `online_weight_minimum` because calculation of trended and online weight is broken when running tests
auto const stake = node.config.online_weight_minimum.number ();
auto const level0 = stake / 5000; // 0.02%
auto const level1 = stake / 500; // 0.2%
auto const level2 = stake / 50; // 2%

nano::keypair key0;
nano::keypair key1;
Expand All @@ -153,7 +154,6 @@ TEST (vote_processor, weights)

// Wait for representatives
ASSERT_TIMELY_EQ (10s, node.ledger.cache.rep_weights.get_rep_amounts ().size (), 4);
ASSERT_TIMELY_EQ (5s, node.online_reps.online (), total);

// Wait for rep tiers to be updated
node.stats.clear ();
Expand Down

0 comments on commit 83dfd27

Please sign in to comment.