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

fix(rpc): display proper governance fee in getgovernanceinfo #4778

Merged
merged 1 commit into from Apr 19, 2022

Conversation

PastaPastaPasta
Copy link
Member

@PastaPastaPasta PastaPastaPasta commented Apr 18, 2022

fix rpc getgovernanceinfo proposal fee output

See this patch for a test (but it causes the main test in the file not to run for some reason

Index: test/functional/feature_governance_objects.py
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
diff --git a/test/functional/feature_governance_objects.py b/test/functional/feature_governance_objects.py
--- a/test/functional/feature_governance_objects.py	(revision 786d0b39f6b4bf6f05acf437baac4d184a7b06cc)
+++ b/test/functional/feature_governance_objects.py	(date 1650299271683)
@@ -51,6 +51,8 @@
 
     def run_test(self):
 
+        self.log.info("main")
+
         time_start = time.time()
         object_type = 1  # GOVERNANCE PROPOSAL
 
@@ -99,5 +101,22 @@
         assert_raises_rpc_error(-8, "Negative count", self.nodes[0].gobject, "list-prepared", -1000)
 
 
+class DashGovFeeTest (DashTestFramework):
+    def set_test_params(self):
+        self.set_dash_test_params(1, 0)
+
+    def run_test(self):
+
+        self.log.info("Check that initial proposalfee is 5 Dash")
+        assert self.nodes[0].getblockchaininfo()['bip9_softforks']['dip0024']['status'] != 'active'
+        assert self.nodes[0].getgovernanceinfo()['proposalfee'] == 5
+
+        self.log.info("Activating DIP24")
+        self.activate_dip0024(slow_mode=True)
+        self.log.info('Check that proposalfee is now 1 Dash')
+        assert self.nodes[0].getgovernanceinfo()['proposalfee'] == 1
+
+
 if __name__ == '__main__':
+    DashGovFeeTest().main()
     DashGovernanceTest().main()
     

@PastaPastaPasta PastaPastaPasta added this to the 18 milestone Apr 18, 2022
@PastaPastaPasta PastaPastaPasta added bug RPC Some notable changes to RPC params/behaviour/descriptions backport-candidate-18.x labels Apr 18, 2022
@PastaPastaPasta PastaPastaPasta modified the milestones: 18, 19 Apr 18, 2022
Copy link

@UdjinM6 UdjinM6 left a comment

Choose a reason for hiding this comment

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

utACK

@UdjinM6 UdjinM6 merged commit 9b8c2dc into dashpay:develop Apr 19, 2022
@PastaPastaPasta PastaPastaPasta deleted the fix-rpc-govfee branch April 19, 2022 14:47
@UdjinM6 UdjinM6 modified the milestones: 19, 18 Apr 19, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug RPC Some notable changes to RPC params/behaviour/descriptions
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants