mirror of
https://github.com/aljazceru/lightning.git
synced 2025-12-19 07:04:22 +01:00
paymod: Iterate through the routehints in order
We store an offset of the current routehint in the modifier data. It gets incremented on retry, and it gets reset to 0 on split. This is because once we split we have a different amount and a previously unusable routehint becomes usable again.
This commit is contained in:
@@ -296,6 +296,11 @@ struct routehints_data {
|
||||
/* Current routehint, if any. */
|
||||
struct route_info *current_routehint;
|
||||
|
||||
/* Position of the current routehint in the routehints
|
||||
* array. Inherited and incremented on child payments and reset on
|
||||
* split. */
|
||||
int offset;
|
||||
|
||||
/* We modify the CLTV in the getroute call, so we need to remember
|
||||
* what the final cltv delta was so we re-apply it correctly. */
|
||||
u32 final_cltv;
|
||||
|
||||
Reference in New Issue
Block a user