dashpay / dash

Dash - Reinventing Cryptocurrency
https://www.dash.org
MIT License
1.49k stars 1.19k forks source link

feat: support descriptor wallets for RPC protx updateregistar #6066

Closed knst closed 1 week ago

knst commented 3 weeks ago

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: