coblox / nectar

GNU General Public License v3.0
0 stars 1 forks source link

Reserve funds before respawn #62

Closed luckysori closed 4 years ago

luckysori commented 4 years ago

Given that we only free funds once the swap execution is over, we need to make sure that we always reserve funds before respawning (since the Maker's state is lost between restarts of Nectar).

Additionally, we could examine swaps and decide whether we have enough money or not to continue with the execution successfully, but it would be quite complex. Instead, we let the swap execution fail, which is functionally equivalent to preventing the respawn.


There is a second patch which makes it so that deny doesn't try to remove the order's taker from the set of ActiveTakers, as @da-kami correctly suggested in his review of PR #59.