-
Notifications
You must be signed in to change notification settings - Fork 17
Description
It seems that for co-operative exit spark calculates the fees based on the leaves we supply in fetch_coop_exit_fee_quote call.
If the following call to send_payment reserves different set of leaves that may affect fees and reject the payment by spark.
On high volume instance this may be pretty common and we probably can solve that by adding a flag to the prepare call "reserve" which if true leaves will be reserved and the reservation id will be returned as part of the prepare response and later will be sent along with the following send call.
This will put some responsibility on the user to release/cancel the reservation in case of not moving to the actual payment.
We also need to ensure we have some sort of expiry to such reservations in case the user didn't do that (like the case we already have in postgres tree store).