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

feat: support descriptor wallets for RPC protx updateregistar #6066

Merged

Conversation

knst
Copy link
Collaborator

@knst knst commented Jun 17, 2024

Issue being fixed or feature implemented

RPC protx updateregistar uses 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)

What was done?

New method SignSpecialTxPayloadByHash is implemented in interface instead exporting raw private key for some address.

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

How Has This Been Tested?

Functional test feature_dip3_deterministicmns.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 requested review from PastaPastaPasta and UdjinM6 June 19, 2024 06:32
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

Copy link
Member

@PastaPastaPasta PastaPastaPasta left a comment

Choose a reason for hiding this comment

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

utACK c9a600e

@PastaPastaPasta PastaPastaPasta merged commit 4a52099 into dashpay:develop Jun 25, 2024
7 of 8 checks passed
@knst knst deleted the bp-descriptors-7-protx-update-registar branch June 25, 2024 20:00
@UdjinM6 UdjinM6 added this to the 21 milestone Sep 6, 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