Commit 7cb7759
committed
Merge bitcoin#29272: wallet: fix coin selection tracing to return -1 when no change pos
d55fdb1 Move TRACEx parameters to seperate lines (Richard Myers)
2d58629 wallet: fix coin selection tracing to return -1 when no change pos (Richard Myers)
Pull request description:
This is a bugfix for from when [optional was introduced](bitcoin@758501b) for `change_pos` in the wallet. When optional `change_pos` is unset, we should return -1 and not 0.
I added two new checks to the `test/functional/interface_usdt_coinselection.py` which adds coverage for the situations when `normal_create_tx_internal` and `aps_create_tx_internal` events occur with no change.
You can reproduce this bug using the coin-selection-simulation scripts as described in [issue bitcoin#16](achow101/coin-selection-simulation#16). You can also run the `interface_usdt_coinselection.py` test without the changes to `wallet/spend.cpp`.
ACKs for top commit:
0xB10C:
ACK d55fdb1
achow101:
ACK d55fdb1
murchandamus:
ACK d55fdb1
Tree-SHA512: 6efac3b756bdf51debbcb759dc3c4b7a4304626bc047b70025cec02f3a04937ace7712e9558ac71e560fd136005a98c518ac5bb4b90c3282d776beccd0de9749File tree
2 files changed
+40
-5
lines changed- src/wallet
- test/functional
2 files changed
+40
-5
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1127 | 1127 | | |
1128 | 1128 | | |
1129 | 1129 | | |
1130 | | - | |
| 1130 | + | |
| 1131 | + | |
| 1132 | + | |
| 1133 | + | |
| 1134 | + | |
| 1135 | + | |
1131 | 1136 | | |
1132 | 1137 | | |
1133 | 1138 | | |
| |||
1336 | 1341 | | |
1337 | 1342 | | |
1338 | 1343 | | |
1339 | | - | |
1340 | | - | |
| 1344 | + | |
| 1345 | + | |
| 1346 | + | |
| 1347 | + | |
| 1348 | + | |
1341 | 1349 | | |
1342 | 1350 | | |
1343 | 1351 | | |
| |||
1354 | 1362 | | |
1355 | 1363 | | |
1356 | 1364 | | |
1357 | | - | |
1358 | | - | |
| 1365 | + | |
| 1366 | + | |
| 1367 | + | |
| 1368 | + | |
| 1369 | + | |
| 1370 | + | |
1359 | 1371 | | |
1360 | 1372 | | |
1361 | 1373 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
204 | 204 | | |
205 | 205 | | |
206 | 206 | | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
207 | 230 | | |
208 | 231 | | |
209 | 232 | | |
| |||
0 commit comments