It's a bit odd, but it's true. When multi addresses are generated in a wallet, no need too many, two or three addresses is enough, and then send a bit gas to each one. Then if you make a transaction and if the from address has more than double of your transfer value, the tx will be made successfully. Else, it will return Failed execution. My example is like this:

For example, when value is 150 or 140, it will choose the 5th or the 7th address. They have balance of 150, and 150 and 140 is more than 150/2, then execution failed.
So it fail when it need to split the amount, right?
Not for all, but seems for NEO transaction, 1/2 of the from address balance is a watershed. And I also find when making a GAS transaction, it'll look for the least balance(except from address) to pay for net_fee + sys_fee. If this address doesn't have enough fee, then execution fails, no matter other addresses in this wallet have enough balance or not.
I send 10 to one, 5 to other, and send back 15 to the original, and all works as expected, could you provide me a small sample ?
@shargon here is a small sample

With gas could be different, because maybe it need more gas for the fee. Could you provide me a small example with neo? i think that is easier to test with neo
With gas could be different, because maybe it need more gas for the fee. Could you provide me a small example with neo? i think that is easier to test with neo
@shargon Got it? When the transfer value is more thanfromAddress.balance/2, it always look for the least balance address to pay forFee. If the gas balance in that address is not enough to pay for fee, transaction execution will fail. But if the transfer value is less thanfromAddress.balance/2, transaction can be made successfully.
Step 1

Step 2

Error:

There is not enough gas in the wallet one for send this to wallet two
Then , in the second step of the loop

It fail because you don't have enough balance in the snapshot
We change snapshot to snapshot.Clone(), then this issue is fixed.

This code
Should be executed outside the loop, and the loop, shoud be only for find the gas account
Yes, it works. Do you want to apply the patch, or i do?

Nice catch team 馃槈 ! @superboyiii @nicolegys
You apply the patch 馃槈
@shargon Thanks for your investigation.