Skip to content

Commit

Permalink
Fix rpc.receivable_unconfirmed
Browse files Browse the repository at this point in the history
In RPC speak, cofnirmed is equivalent to cemented and in this case the
test only check if the election is not active, which indirectly but not
directly implies that the election is confirmed. But even then it is not
necesarily cemented since that is an extra background step.

We should check for cemented with the function nano::test:confirmed(),
which is also confusing...
  • Loading branch information
dsiganos committed Jan 22, 2024
1 parent 06d8b4e commit 8d7055c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion nano/rpc_test/receivable.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ TEST (rpc, receivable_unconfirmed)
request.put ("include_only_confirmed", "false");
ASSERT_TRUE (check_block_response_count (system, rpc_ctx, request, 1));
ASSERT_TRUE (nano::test::start_elections (system, *node, { block1->hash () }, true));
ASSERT_TIMELY (5s, !node->active.active (*block1));
ASSERT_TIMELY (5s, nano::test::confirmed (*node, { block1 }));
request.put ("include_only_confirmed", "true");
ASSERT_TRUE (check_block_response_count (system, rpc_ctx, request, 1));
}
Expand Down

0 comments on commit 8d7055c

Please sign in to comment.