Skip to content

Commit

Permalink
Merge pull request #815 from mkoura/dbsync_reward_enhancements
Browse files Browse the repository at this point in the history
Minor enhancements to rewards checks in db-sync
  • Loading branch information
mkoura committed Dec 3, 2021
2 parents 0bc6c27 + 6647c6d commit 22f48bb
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions cardano_node_tests/tests/test_delegation.py
Expand Up @@ -447,7 +447,7 @@ def test_undelegate(
not stake_addr_info.delegation
), f"Stake address is still delegated: {stake_addr_info}"

cluster.wait_for_new_epoch(padding_seconds=10)
cluster.wait_for_new_epoch(padding_seconds=20)
this_epoch = cluster.get_epoch()
assert cluster.get_stake_addr_info(
delegation_out.pool_user.stake.address
Expand All @@ -465,7 +465,7 @@ def test_undelegate(
assert db_rewards
db_reward_epochs = sorted(r.spendable_epoch for r in db_rewards.rewards)
assert db_reward_epochs[0] == init_epoch + 4
assert db_reward_epochs[-1] == this_epoch
assert this_epoch in db_reward_epochs

@allure.link(helpers.get_vcs_link())
@pytest.mark.parametrize(
Expand Down
2 changes: 1 addition & 1 deletion cardano_node_tests/tests/test_staking.py
Expand Up @@ -180,7 +180,7 @@ def _dbsync_check_rewards(
db_pool_ids_dict = {
r.spendable_epoch: r.pool_id
for r in reward_db_record.rewards
if r.pool_id and pool_first_epoch <= r.spendable_epoch <= epoch_to
if r.pool_id and r.type == "member" and pool_first_epoch <= r.spendable_epoch <= epoch_to
}
assert pool_ids_dict == db_pool_ids_dict

Expand Down

0 comments on commit 22f48bb

Please sign in to comment.