Commit 7269993
validation: Correct _bulk_tx formula for Dash's weight calculation
The previous fix removed the division by 4 (correct for Dash since
get_weight() returns vsize, not weight units), but incorrectly kept
the +3 offset from Bitcoin's formula.
In Bitcoin: (target - current + 3) // 4
- The +3 ensures rounding up
- After division, adds 0-3 vbytes based on remainder
In Dash: target - current
- No division needed since get_weight() = vsize
- The +3 was causing transactions to be 3 bytes too large
- This caused insufficient fees (min relay fee not met)
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <[email protected]>1 parent 221ace0 commit 7269993
1 file changed
+6
-6
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
99 | 99 | | |
100 | 100 | | |
101 | 101 | | |
102 | | - | |
103 | | - | |
104 | | - | |
105 | | - | |
106 | | - | |
107 | | - | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
108 | 108 | | |
109 | 109 | | |
110 | 110 | | |
| |||
0 commit comments