Skip to content

feat: support descriptor wallets for RPC governance votemany, votealias - #6094

Merged
PastaPastaPasta merged 2 commits into
dashpay:developfrom
knst:bp-descriptors-8-governance
Jul 16, 2024
Merged

feat: support descriptor wallets for RPC governance votemany, votealias#6094
PastaPastaPasta merged 2 commits into
dashpay:developfrom
knst:bp-descriptors-8-governance

Conversation

@knst

@knst knst commented Jul 4, 2024

Copy link
Copy Markdown
Collaborator

Issue being fixed or feature implemented

RPCs governance votemany and governance votealias use forcely LegacyScriptPubKeyMan instead using CWallet's interface.
It causes a failures such as

test_framework.authproxy.JSONRPCException: This type of wallet does not support this command (-4)

See https://github.com/dashpay/dash-issues/issues/59 to track progress

What was done?

Use CWallet's interfaces instead LegacyScriptPubKeyMan

How Has This Been Tested?

Functional tests feature_governance.py and feature_governance_cl.py to run by both ways - legacy and descriptor wallets.

Run unit and functional tests.

Extra test done locally:

--- a/test/functional/test_framework/test_framework.py
+++ b/test/functional/test_framework/test_framework.py
@@ -242,10 +242,10 @@ class BitcoinTestFramework(metaclass=BitcoinTestMetaClass):
 
         if self.options.descriptors is None:
             # Prefer BDB unless it isn't available
-            if self.is_bdb_compiled():
-                self.options.descriptors = False
-            elif self.is_sqlite_compiled():
+            if self.is_sqlite_compiled():
                 self.options.descriptors = True
+            elif self.is_bdb_compiled():
+                self.options.descriptors = False

to flip flag descriptor wallets/legacy wallets for all functional tests.

Breaking Changes

N/A

Checklist:

  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have added or updated relevant unit/integration/functional/e2e tests
  • I have made corresponding changes to the documentation
  • I have assigned this pull request to a milestone

@knst knst added this to the 21 milestone Jul 4, 2024
@knst
knst force-pushed the bp-descriptors-8-governance branch from 101da69 to c72ec70 Compare July 5, 2024 08:37
@PastaPastaPasta

Copy link
Copy Markdown
Member

Any reason this should be in v21 instead of 21.1?

@UdjinM6 UdjinM6 left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

utACK c72ec70

@PastaPastaPasta PastaPastaPasta modified the milestones: 21, 21.1 Jul 7, 2024

@PastaPastaPasta PastaPastaPasta left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

utACK c72ec70

@PastaPastaPasta
PastaPastaPasta merged commit f16025f into dashpay:develop Jul 16, 2024
@UdjinM6 UdjinM6 modified the milestones: 21.1, 21.2 Aug 8, 2024
@UdjinM6 UdjinM6 modified the milestones: 21.2, 22 Oct 29, 2024
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.

3 participants