Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add params module tests #56

Merged
merged 8 commits into from
Aug 3, 2022
Merged

Conversation

NagaTulasi
Copy link
Contributor

No description provided.

@NagaTulasi NagaTulasi marked this pull request as ready for review July 20, 2022 11:00
class TestParamsModuleQUeries(unittest.TestCase):
def test_subspace_query(self):
path = f"{HOME}/.simd-1/config/"
with open(path + "genesis.json",encoding="utf8") as file:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

don't need to cross check with genesis params.

subspace_distribution = query_subspace("distribution", "bonusproposerreward")[
1
]["value"]
self.assertEqual(
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

just cross check if the value is a valid integer

subspace_slashing = query_subspace("slashing", "SignedBlocksWindow")[1]["value"]
self.assertEqual(
eval(subspace_slashing),
(data["app_state"]["slashing"]["params"]["signed_blocks_window"]),
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same as above

@@ -0,0 +1,15 @@
#/bin/sh

set -e
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this file is not required

@anilcse anilcse merged commit 94606db into cosmos:master Aug 3, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants