Commit 7498259
committed
Only avoid duplicate payments if we failed sending
Previously, we denied retrying any payment for which we already had seen
the payment hash. However, this is rather invasive as payments might
fail due to local connections issues or unavailability of usable
channels, in which case the invoices/payment hashes would be 'burnt' and
couldn't get retried.
Here, we introduce a new `PaymentStatus::SendingFailed` to differentiate
send failures and allow retrying tracked payments if they failed to send
immediately. We also rename some error types accordingly for further
clarification.1 parent b6b2b83 commit 7498259
File tree
5 files changed
+51
-24
lines changed- bindings
- src
- test
5 files changed
+51
-24
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
73 | 73 | | |
74 | 74 | | |
75 | 75 | | |
76 | | - | |
| 76 | + | |
77 | 77 | | |
78 | 78 | | |
79 | 79 | | |
| |||
113 | 113 | | |
114 | 114 | | |
115 | 115 | | |
| 116 | + | |
116 | 117 | | |
117 | 118 | | |
118 | 119 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
16 | | - | |
17 | | - | |
| 16 | + | |
| 17 | + | |
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
| |||
67 | 67 | | |
68 | 68 | | |
69 | 69 | | |
70 | | - | |
| 70 | + | |
71 | 71 | | |
72 | 72 | | |
73 | 73 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1297 | 1297 | | |
1298 | 1298 | | |
1299 | 1299 | | |
1300 | | - | |
1301 | | - | |
1302 | | - | |
| 1300 | + | |
| 1301 | + | |
| 1302 | + | |
| 1303 | + | |
| 1304 | + | |
1303 | 1305 | | |
1304 | 1306 | | |
1305 | 1307 | | |
| |||
1339 | 1341 | | |
1340 | 1342 | | |
1341 | 1343 | | |
1342 | | - | |
| 1344 | + | |
1343 | 1345 | | |
1344 | 1346 | | |
1345 | 1347 | | |
1346 | | - | |
| 1348 | + | |
| 1349 | + | |
| 1350 | + | |
| 1351 | + | |
| 1352 | + | |
| 1353 | + | |
1347 | 1354 | | |
1348 | 1355 | | |
1349 | 1356 | | |
| |||
1372 | 1379 | | |
1373 | 1380 | | |
1374 | 1381 | | |
1375 | | - | |
1376 | | - | |
1377 | | - | |
| 1382 | + | |
| 1383 | + | |
| 1384 | + | |
| 1385 | + | |
| 1386 | + | |
1378 | 1387 | | |
1379 | 1388 | | |
1380 | 1389 | | |
| |||
1433 | 1442 | | |
1434 | 1443 | | |
1435 | 1444 | | |
1436 | | - | |
| 1445 | + | |
1437 | 1446 | | |
1438 | 1447 | | |
1439 | 1448 | | |
1440 | | - | |
| 1449 | + | |
| 1450 | + | |
| 1451 | + | |
| 1452 | + | |
| 1453 | + | |
| 1454 | + | |
1441 | 1455 | | |
1442 | 1456 | | |
1443 | 1457 | | |
| |||
1454 | 1468 | | |
1455 | 1469 | | |
1456 | 1470 | | |
| 1471 | + | |
| 1472 | + | |
| 1473 | + | |
| 1474 | + | |
| 1475 | + | |
| 1476 | + | |
| 1477 | + | |
1457 | 1478 | | |
1458 | 1479 | | |
1459 | 1480 | | |
| |||
1492 | 1513 | | |
1493 | 1514 | | |
1494 | 1515 | | |
1495 | | - | |
| 1516 | + | |
1496 | 1517 | | |
1497 | 1518 | | |
1498 | 1519 | | |
1499 | 1520 | | |
1500 | 1521 | | |
1501 | | - | |
| 1522 | + | |
| 1523 | + | |
| 1524 | + | |
| 1525 | + | |
| 1526 | + | |
| 1527 | + | |
1502 | 1528 | | |
1503 | 1529 | | |
1504 | 1530 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
57 | 57 | | |
58 | 58 | | |
59 | 59 | | |
| 60 | + | |
| 61 | + | |
60 | 62 | | |
61 | 63 | | |
62 | | - | |
| 64 | + | |
63 | 65 | | |
64 | 66 | | |
65 | 67 | | |
66 | 68 | | |
67 | 69 | | |
68 | | - | |
69 | | - | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
70 | 73 | | |
71 | 74 | | |
72 | 75 | | |
| |||
141 | 144 | | |
142 | 145 | | |
143 | 146 | | |
144 | | - | |
145 | | - | |
146 | | - | |
147 | | - | |
148 | 147 | | |
149 | 148 | | |
150 | 149 | | |
| |||
237 | 236 | | |
238 | 237 | | |
239 | 238 | | |
240 | | - | |
| 239 | + | |
241 | 240 | | |
242 | 241 | | |
243 | 242 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
100 | 100 | | |
101 | 101 | | |
102 | 102 | | |
| 103 | + | |
103 | 104 | | |
104 | 105 | | |
105 | 106 | | |
| |||
0 commit comments