Bundle thousands of tiny transactions in dozens of small transactions to restore the health of a wallet which has been polluted by p2pool microtransactions
This script below sends out many transactions in one go, to the same address.
So the tiny incoming transactions are bundled up to small outgoing transactions
which can be sent back as one big transaction. Problem solved.
This is an example in which all goes well with my script and the parameters, using the command:
the output is:
Press Ctrl-C if you do NOT want that, or ENTER if you agree... Good. Let us start.
Balance before the action was 51.10549
BEFORE=51.10549000 AFTER=41.10429000 TX-ID=6d828c...
BEFORE=41.10429000 AFTER=31.10299000 TX-ID=bc766b...
BEFORE=31.10299000 AFTER=21.10149000 TX-ID=01059b...
Ready.
In total, including transaction fees, 30.004 were sent.
Balance after all that action now is: 21.10149
If the package size is still too large (and thus would bundle too many tiny transactions into one), like in my case with
then the result is like this:
Press Ctrl-C if you do NOT want that, or ENTER if you agree... Good. Let us start.
Balance before the action was 144.11369000
error: {"code":-4,"message":"Transaction too large"}
error: {"code":-4,"message":"Transaction too large"}
error: {"code":-4,"message":"Transaction too large"}
Ready.
In total, including transaction fees, 0 were sent.
Balance after all that action now is: 144.11369000
I guess that's it. My script solved my problem. May it solve yours, too.
Here it is: "sendmany.sh" incl short instructions
https://github.com/drakoin/LinuxWallet/blob/master/sendmany.sh
All the problems my script ran into (no daemon there at all, tx still too large, insufficient funds, etc.) are caught now, and should not cause problems anymore. Only the ones that haven't happened, might still cause problems :-) If you run this, read the script before, so that you understand what it does. No guarantees whatsoever. Your own risk.
But still - may it help you