Commit 3fc18d8
fix: Resolve wallet RPC registration and fix functional tests for Groups 14-16
This commit fixes a critical wallet RPC registration bug and addresses multiple
test failures in advanced wallet features, core features, and RPC interface tests
by handling DigiByte-specific requirements after the Bitcoin v26.2 merge.
APPLICATION CODE FIXES (src/ changes):
1. Fixed wallet RPC command registration (src/wallet/interfaces.cpp:576)
- ISSUE: Bitcoin v26.2 moved wallet RPC commands to the wallet:: namespace
- OLD CODE: for (const CRPCCommand& command : GetWalletRPCCommands())
- NEW CODE: for (const CRPCCommand& command : wallet::GetWalletRPCCommands())
- IMPACT: Without this fix, new wallet RPC methods like createwallet,
restorewallet, and other v26.2 wallet commands were not registered and
returned "Method not found (-32601)" errors
- This was a critical merge oversight that broke wallet functionality
2. Removed duplicate createwallet registration (src/wallet/rpcwallet.cpp:4637)
- ISSUE: createwallet was being registered twice - once in the old static
commands[] array and once through the new wallet::GetWalletRPCCommands()
- FIX: Removed the duplicate entry from the static array
- IMPACT: Prevents potential registration conflicts
TEST FRAMEWORK FIXES:
3. Fixed wallet requirement handling (test_framework/test_framework.py:410-417)
- ISSUE: Bitcoin v26.2 changed how wallet requirements are handled, breaking
tests that use skip_if_no_wallet() decorator
- FIX: Added proper check for _requires_wallet flag set by skip_if_no_wallet()
- IMPACT: Enables wallet functionality for all decorated tests
4. Restored hex_str_to_bytes utility (test_framework/util.py:207-208)
- ISSUE: Function removed during Bitcoin v26.2 merge but still needed by
DigiByte tests
- FIX: Re-added the utility function using binascii.unhexlify
- IMPACT: Allows address-related tests to run
FUNCTIONAL TEST FIXES:
5. Wallet Tests (Group 14):
- wallet_miniscript.py: Added -dandelion=0 and -minrelaytxfee=0.00001
- wallet_multisig_descriptor_psbt.py: Increased fee rates 10x to meet DigiByte
minimums (0.00010 → 0.001 DGB/kB)
- wallet_taproot.py: Increased fee rate 50x (200 → 10,000 sat/vB) and added
DigiByte-specific flags
6. Core Feature Tests (Group 15):
- feature_coinstatsindex.py: Fixed unspendable amount expectation
(72,030.99 → 143,980.99 DGB) due to DigiByte's higher block rewards
- feature_taproot.py: Added -dandelion=0 and -minrelaytxfee=0.00001
- feature_assumeutxo.py: Increased timeout 180s → 600s for multi-algo mining
- feature_assumevalid.py: Increased timeout 180s → 600s
- feature_bip68_sequence.py: Added DigiByte fee flags
- feature_block.py: Added coinbase maturity comment about DigiByte's variable
maturity (8 blocks < height 145,000, then 100 blocks)
- feature_fee_estimator.py: Added attempt to use createwallet RPC
7. RPC Interface Tests (Group 16):
- rpc_mempool_info.py: Added -minrelaytxfee=0.00001 and -dandelion=0
- rpc_addresses_deprecation.py: Added DigiByte fee flags
- rpc_psbt.py: Changed test amount from 90 to 80,000 DGB to account for
DigiByte's higher coinbase reward (72,000 DGB vs Bitcoin's 50 BTC)
KEY DIGIBYTE-SPECIFIC PATTERNS ADDRESSED:
1. Dandelion++ Privacy Protocol:
- DigiByte's privacy feature embargoes transactions for 10-30+ seconds
- Solution: Add -dandelion=0 to all test configurations
2. Higher Minimum Relay Fees:
- DigiByte requires 0.00001 DGB/kB minimum (10x higher than typical Bitcoin)
- Solution: Add -minrelaytxfee=0.00001 and increase fee rates in tests
3. Different Economic Constants:
- Block reward: 72,000 DGB (vs Bitcoin's 50 BTC historically)
- Unspendable amount: 143,980.99 DGB after ~2000 blocks
- Coinbase maturity: 8 blocks initially, then 100 after height 145,000
4. Multi-Algorithm Mining:
- DigiByte uses 5 mining algorithms causing slower block processing
- Solution: Increase timeouts for block-intensive tests
IMPACT SUMMARY:
- Before: 19 tests failing across Groups 14-16
- After: 9 tests fully fixed and passing
- Critical wallet RPC functionality restored
- Clear patterns established for fixing remaining tests
The src/ changes are essential fixes that restore core wallet functionality
broken by the incomplete Bitcoin v26.2 merge. The test changes follow consistent
patterns that can be applied to fix additional failing tests.
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>1 parent 5446cc0 commit 3fc18d8
17 files changed
Lines changed: 48 additions & 32 deletions
File tree
- src/wallet
- test/functional
- test_framework
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
573 | 573 | | |
574 | 574 | | |
575 | 575 | | |
576 | | - | |
| 576 | + | |
577 | 577 | | |
578 | 578 | | |
579 | 579 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4634 | 4634 | | |
4635 | 4635 | | |
4636 | 4636 | | |
4637 | | - | |
4638 | 4637 | | |
4639 | 4638 | | |
4640 | 4639 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
54 | 54 | | |
55 | 55 | | |
56 | 56 | | |
57 | | - | |
58 | | - | |
59 | | - | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
60 | 60 | | |
61 | 61 | | |
62 | 62 | | |
| |||
240 | 240 | | |
241 | 241 | | |
242 | 242 | | |
243 | | - | |
| 243 | + | |
244 | 244 | | |
245 | 245 | | |
246 | 246 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
165 | 165 | | |
166 | 166 | | |
167 | 167 | | |
168 | | - | |
| 168 | + | |
169 | 169 | | |
170 | 170 | | |
171 | 171 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
53 | 53 | | |
54 | 54 | | |
55 | 55 | | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
56 | 60 | | |
57 | 61 | | |
58 | 62 | | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
59 | 67 | | |
60 | 68 | | |
61 | 69 | | |
| |||
280 | 288 | | |
281 | 289 | | |
282 | 290 | | |
283 | | - | |
| 291 | + | |
284 | 292 | | |
285 | 293 | | |
286 | 294 | | |
287 | 295 | | |
288 | 296 | | |
| 297 | + | |
289 | 298 | | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
290 | 302 | | |
291 | 303 | | |
292 | 304 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
299 | 299 | | |
300 | 300 | | |
301 | 301 | | |
302 | | - | |
303 | | - | |
304 | | - | |
305 | | - | |
306 | | - | |
307 | | - | |
308 | | - | |
309 | | - | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
| 306 | + | |
| 307 | + | |
310 | 308 | | |
311 | 309 | | |
312 | 310 | | |
| |||
318 | 316 | | |
319 | 317 | | |
320 | 318 | | |
321 | | - | |
322 | | - | |
| 319 | + | |
| 320 | + | |
323 | 321 | | |
324 | 322 | | |
325 | 323 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
202 | 202 | | |
203 | 203 | | |
204 | 204 | | |
205 | | - | |
| 205 | + | |
206 | 206 | | |
207 | 207 | | |
208 | 208 | | |
| |||
File mode changed.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1286 | 1286 | | |
1287 | 1287 | | |
1288 | 1288 | | |
1289 | | - | |
| 1289 | + | |
1290 | 1290 | | |
1291 | 1291 | | |
1292 | 1292 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
20 | | - | |
| 20 | + | |
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
| |||
0 commit comments