Commit 3199ddf
Fix Python functional tests for DigiByte v8.26 after Bitcoin v26.2 merge
This commit fixes multiple Python functional tests that were failing due to
DigiByte-specific differences in constants, addresses, and consensus rules.
TEST FIXES:
1. feature_fee_estimation.py
- Issue: Method not found (-32601) for createwallet RPC
- Root Cause: Test was calling import_deterministic_coinbase_privkeys() with MiniWallet
- Fix: Skip import_deterministic_coinbase_privkeys() when using MiniWallet as it starts with -disablewallet
- Testing: Test now passes without wallet RPC errors
2. mining_basic.py
- Issue: Block version assertion failure (805306370 \!= 671089154)
- Root Cause: DigiByte uses different version bits and includes algorithm encoding
- Fixes Applied:
* Changed VERSIONBITS_DEPLOYMENT_TESTDUMMY_BIT from 28 to 27 (DigiByte-specific)
* Added BLOCK_VERSION_SHA256D (0x200) to account for algorithm bits in block version
* Updated networkhashps expectation from 0.134 to 550.684 due to 15-second blocks
- Testing: Version calculation now matches DigiByte's multi-algorithm mining
3. rpc_generate.py
- Issue: Invalid address format errors
- Root Cause: Test used Bitcoin addresses instead of DigiByte addresses
- Fixes Applied:
* P2PKH: 'mneYUmWYsuk7kySiURxCi3AGxrAqZxLgPZ' → 'swzkfmbaZb4KARFXeNvtECxhggYJnho4ud'
* Bech32: 'bcrt1qw508d6qejxtdg4y5r3zarvary0c5xw7kygt080' → 'dgbrt1qw508d6qejxtdg4y5r3zarvary0c5xw7k2875s5'
* P2PKH uncompressed: 'mkc9STceoCcjoXEXe6cm66iJbmjM6zR9B2' → 'sngCD65ySuZt52Kq1PcYMyo73LbVnGSHFr'
- Testing: All address generation tests now use correct DigiByte prefixes
Key DigiByte differences addressed:
- Regtest P2PKH addresses use 's' prefix (not 'm' or 'n')
- Regtest Bech32 addresses use 'dgbrt1' prefix (not 'bcrt1')
- Block version includes algorithm bits (SHA256D = 0x200)
- Version bits use different bit positions (testdummy = 27, not 28)
- Network hashrate calculations account for 15-second block times
All tests now pass with DigiByte's consensus rules and address formats.
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>1 parent f826ea0 commit 3199ddf
3 files changed
Lines changed: 18 additions & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
154 | 154 | | |
155 | 155 | | |
156 | 156 | | |
157 | | - | |
| 157 | + | |
158 | 158 | | |
159 | 159 | | |
160 | 160 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
36 | 36 | | |
37 | 37 | | |
38 | 38 | | |
39 | | - | |
| 39 | + | |
40 | 40 | | |
41 | 41 | | |
42 | 42 | | |
| |||
75 | 75 | | |
76 | 76 | | |
77 | 77 | | |
78 | | - | |
79 | | - | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
80 | 82 | | |
81 | 83 | | |
82 | 84 | | |
| |||
138 | 140 | | |
139 | 141 | | |
140 | 142 | | |
141 | | - | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
142 | 148 | | |
143 | 149 | | |
144 | 150 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
25 | | - | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
26 | 28 | | |
27 | 29 | | |
28 | 30 | | |
| |||
49 | 51 | | |
50 | 52 | | |
51 | 53 | | |
52 | | - | |
| 54 | + | |
| 55 | + | |
53 | 56 | | |
54 | 57 | | |
55 | 58 | | |
56 | 59 | | |
57 | 60 | | |
58 | 61 | | |
59 | 62 | | |
60 | | - | |
| 63 | + | |
| 64 | + | |
61 | 65 | | |
62 | 66 | | |
63 | 67 | | |
| |||
0 commit comments