This could solve the over filling issue (I mean if there is better price than you want).
But how about partial filling?
Partially filled orders are not completely filled and will trigger an exception if the fill_or_kill flag is set. See limit_order_create_evaluator::do_apply and database::apply_order .
Is that really true? Arent they independently evaluated and in a chain of orders that breaks in the middle everything after the crack will be killed but all the orders before are filled.
Kill-fill flag is for ops .. not for transactiosn .. what am i missing here
If any of the operations in a transaction throws an exception during evaluation, the whole transaction is rolled back. (More precisely, it is only committed when no exception is thrown, see database::_generate_block)
Edit: ... oh .. going via temp account is a great idea .. that fixes a lot!
Well, yes. I attempted to create such a transaction manually and found that it's a real PITA because you essentially have to apply the full market logic with all kinds of fees etc to make sure that the TEMP_ACCOUNT ends up empty. Doable, but definitely not simple.