Commit 9c271d7
committed
Fix BOLT11 DuplicatePayment triggering on-chain fallback in unified payments
UnifiedPayment::send previously treated any error from the BOLT11 leg
of a unified payment as non-terminal and fell through to the on-chain
payment method. This meant a retried BOLT11 payment that returns
Error::DuplicatePayment would still result in an on-chain transaction
being broadcast for the same invoice — a duplicate payment.
Error::DuplicatePayment is now terminal in UnifiedPayment::send: the
unified payment aborts instead of falling back to on-chain.
Fixes #1033.
unified_send_receive_bip21_uri already funds two nodes, opens a
channel, and sends a successful BOLT11 payment via uri_str_without_offer
partway through. Add the regression assertion right there — retry the
same uri_str_without_offer and assert DuplicatePayment, not a new
on-chain payment — instead of duplicating that setup in a standalone
test.1 parent 0428cab commit 9c271d7
2 files changed
Lines changed: 45 additions & 9 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
291 | 291 | | |
292 | 292 | | |
293 | 293 | | |
294 | | - | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
295 | 302 | | |
296 | | - | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
| 306 | + | |
| 307 | + | |
| 308 | + | |
| 309 | + | |
297 | 310 | | |
298 | 311 | | |
299 | 312 | | |
| |||
308 | 321 | | |
309 | 322 | | |
310 | 323 | | |
311 | | - | |
312 | | - | |
| 324 | + | |
| 325 | + | |
| 326 | + | |
| 327 | + | |
| 328 | + | |
| 329 | + | |
| 330 | + | |
| 331 | + | |
| 332 | + | |
| 333 | + | |
| 334 | + | |
| 335 | + | |
| 336 | + | |
313 | 337 | | |
314 | | - | |
315 | | - | |
316 | | - | |
317 | | - | |
318 | | - | |
| 338 | + | |
319 | 339 | | |
320 | 340 | | |
321 | 341 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3395 | 3395 | | |
3396 | 3396 | | |
3397 | 3397 | | |
| 3398 | + | |
| 3399 | + | |
| 3400 | + | |
| 3401 | + | |
| 3402 | + | |
| 3403 | + | |
| 3404 | + | |
| 3405 | + | |
| 3406 | + | |
| 3407 | + | |
| 3408 | + | |
| 3409 | + | |
| 3410 | + | |
| 3411 | + | |
| 3412 | + | |
| 3413 | + | |
3398 | 3414 | | |
3399 | 3415 | | |
3400 | 3416 | | |
| |||
0 commit comments