When doing a try loop on a (partial) payments, the amount is allotted to the path and in the UncertaintyGraph this is considered for the calculation of the success probabilities.
while internally I increase the inflight counter I am actually in the planning phase and to compute the probabilities of planned paths I need to take into account that I already plan to allocate something sats to an edge (without knowing if that will work yet) So maybe we just need to move over the logic from the Enum to the state of a channel where we also have planned sats before we go and send onions and switch those to inflight sats. in this way I would note have to remove them before testing onions. does that make any sense? I am actually not sure myself if this would be any good.
When and how do we handle the amounts the best way?
This is an extract from https://github.com/renepickhardt/pickhardtpayments/pull/24#discussion_r878517534 and https://github.com/renepickhardt/pickhardtpayments/pull/24#discussion_r884080910
When doing a try loop on a (partial) payments, the amount is allotted to the path and in the UncertaintyGraph this is considered for the calculation of the success probabilities.