Skip to content

Commit

Permalink
Merge pull request #236 from mkoura/another_doc_fix
Browse files Browse the repository at this point in the history
Another docs fixes
  • Loading branch information
mkoura committed Nov 11, 2020
2 parents 2cb01a7 + 6efd8fe commit db69f0b
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 17 deletions.
26 changes: 13 additions & 13 deletions cardano_node_tests/tests/test_pools.py
Original file line number Diff line number Diff line change
Expand Up @@ -504,7 +504,7 @@ def test_deregister_stake_pool(
* deregister stake pool
* check that the stake addresses are no longer delegated
* check that the deposit was returned to reward account
* check that the pool deposit was returned to reward account
"""
rand_str = clusterlib.get_rand_str(4)
temp_template = f"{helpers.get_func_name()}_{rand_str}_{no_of_addr}"
Expand Down Expand Up @@ -590,7 +590,7 @@ def test_deregister_stake_pool(
not stake_addr_info.delegation
), f"Stake address is still delegated: {stake_addr_info}"

# check that the deposit was returned to reward account
# check that the pool deposit was returned to reward account
assert (
cluster.get_stake_addr_info(pool_owner.stake.address).reward_account_balance
== src_register_reward + cluster.get_pool_deposit()
Expand All @@ -607,7 +607,7 @@ def test_reregister_stake_pool(
* deregister stake pool
* check that the stake addresses are no longer delegated
* reregister the pool by resubmitting the pool registration certificate,
* reregister the pool by resubmitting the pool registration certificate
* delegate stake address to pool again (the address is already registered)
* check that pool was correctly setup
* check that the stake addresses were delegated
Expand Down Expand Up @@ -736,7 +736,7 @@ def test_cancel_stake_pool_deregistration(
* deregister stake pool in epoch + 2
* reregister the pool by resubmitting the pool registration certificate
* delegate stake address to pool again (the address is already registered)
* check that no additional deposit was used
* check that no additional pool deposit was used
* check that pool is still correctly setup
* check that the stake addresses is still delegated
"""
Expand Down Expand Up @@ -816,7 +816,7 @@ def test_cancel_stake_pool_deregistration(
cluster.wait_for_new_block(new_blocks=2)

# check that the balance for source address was correctly updated
# and no additional deposit was used
# and no additional pool deposit was used
assert (
cluster.get_address_balance(src_address) == src_init_balance - tx_raw_output.fee
), f"Incorrect balance for source address `{src_address}`"
Expand Down Expand Up @@ -857,7 +857,7 @@ def test_update_stake_pool_metadata(
* register pool
* update the pool metadata by resubmitting the pool registration certificate
* check that the pool parameters were correctly updated on chain
* check that the pool metadata hash was correctly updated on chain
"""
rand_str = clusterlib.get_rand_str(4)
temp_template = f"{helpers.get_func_name()}_{rand_str}_{no_of_addr}"
Expand Down Expand Up @@ -932,7 +932,7 @@ def test_update_stake_pool_metadata(
)
cluster.wait_for_new_epoch()

# check that the pool parameters were correctly updated on chain
# check that the pool metadata hash was correctly updated on chain
_check_pool(
cluster_obj=cluster,
stake_pool_id=pool_creation_out.stake_pool_id,
Expand Down Expand Up @@ -1032,7 +1032,7 @@ def test_sign_in_multiple_stages(
* create witness file for each signing key
* sign TX using witness files
* create and register pool
* check that the pool parameters were correctly registered on chain
* check that the pool was correctly registered on chain
"""
rand_str = clusterlib.get_rand_str(4)
temp_template = f"{helpers.get_func_name()}_{rand_str}"
Expand Down Expand Up @@ -1130,7 +1130,7 @@ def test_sign_in_multiple_stages(

cluster.wait_for_new_epoch()

# check that the pool parameters were correctly registered on chain
# check that the pool was correctly registered on chain
stake_pool_id = cluster.get_stake_pool_id(node_cold.vkey_file)
_check_pool(
cluster_obj=cluster,
Expand All @@ -1149,7 +1149,7 @@ def test_pool_registration_deregistration(
* create pool registration cert
* create pool deregistration cert
* register and deregister stake pool in single TX
* check that the deposit was NOT returned to reward account as the stake address
* check that the pool deposit was NOT returned to reward account as the reward address
is not registered (deposit is lost)
"""
rand_str = clusterlib.get_rand_str(4)
Expand Down Expand Up @@ -1222,7 +1222,7 @@ def test_pool_registration_deregistration(
== src_init_balance - tx_raw_output.fee - cluster.get_pool_deposit()
), f"Incorrect balance for source address `{pool_owner.payment.address}`"

# check that the deposit was NOT returned to reward account as the stake address
# check that the pool deposit was NOT returned to reward account as the reward address
# is not registered (deposit is lost)
cluster.wait_for_new_epoch(3, padding_seconds=30)
assert (
Expand Down Expand Up @@ -1448,7 +1448,7 @@ def test_pool_registration_cert_wrong_cold(
pool_users: List[clusterlib.PoolUser],
pool_data: clusterlib.PoolData,
):
"""Try to generate pool registration certificate using wrong Cold key.
"""Try to generate pool registration certificate using wrong Cold vkey.
Expect failure.
"""
Expand All @@ -1471,7 +1471,7 @@ def test_pool_registration_cert_wrong_stake(
pool_users: List[clusterlib.PoolUser],
pool_data: clusterlib.PoolData,
):
"""Try to generate pool registration certificate using wrong stake key.
"""Try to generate pool registration certificate using wrong stake vkey.
Expect failure.
"""
Expand Down
10 changes: 6 additions & 4 deletions cardano_node_tests/tests/test_staking.py
Original file line number Diff line number Diff line change
Expand Up @@ -482,7 +482,7 @@ def test_delegation_cert_with_wrong_key(
cluster_use_pool1: clusterlib.ClusterLib,
pool_users: List[clusterlib.PoolUser],
):
"""Try to generate stake address delegation certificate using wrong key.
"""Try to generate stake address delegation certificate using wrong stake vkey.
Expect failure.
"""
Expand Down Expand Up @@ -1799,9 +1799,10 @@ def test_deregister_reward_addr_retire_pool(
* check that the key deposit was returned
* check that pool owner is NOT receiving rewards
* deregister stake pool
* check that the deposit was NOT returned to reward or stake address
* check that the pool deposit was NOT returned to reward or stake address
* return the pool to the original state - reregister the pool, register
the reward address, delegate the stake address to the pool
* check that pool deposit was needed
* check that pool owner is receiving rewards
"""
# pylint: disable=too-many-statements
Expand Down Expand Up @@ -1918,7 +1919,7 @@ def test_deregister_reward_addr_retire_pool(
pool_owner.payment.address
)

# check that the deposit was NOT returned to reward or stake address
# check that the pool deposit was NOT returned to reward or stake address
assert (
cluster.get_stake_addr_info(pool_owner.stake.address).reward_account_balance
== stake_acount_balance
Expand Down Expand Up @@ -1958,7 +1959,8 @@ def test_deregister_reward_addr_retire_pool(
)
cluster.wait_for_new_block(new_blocks=2)

# check that the balance for source address was correctly updated
# check that the balance for source address was correctly updated and that the
# pool deposit was needed
assert (
cluster.get_address_balance(pool_reward.payment.address)
== src_updated_balance
Expand Down

0 comments on commit db69f0b

Please sign in to comment.