* [ADDED] LIMIT to getMPQueue and getAPQueue
* [ADDED] Default config payout queue size of 1000 for MP and 1000 for AP
* [UPDATED] Payouts cronjob to use this new default limits
This may help some coins that have tx count issues when doing sendmany.
Other coins can play with the values to find their sweet spot. Run the
payout multiple times in a row to force more transactions of the same
amount.
Fixes#1773 and thanks to @jrwr for the idea!
During payouts, we must ensure our wallets main accounts has the funds
to payout users. Hence we implement a wrapper method:
* If account count == 1 we only have main account, return getbalance
* Else return our main accounts balance - calculated unconfirmed
This should keep getbalance untouched when used on other places but
gives our payout processing a proper main account balance.
It's mostly a wrapper for those wallets running multiple accounts in one
wallet. They are warned on the front-end already but this ensure payouts
process properly.
Fixes#1755 once merged.
We can now run payouts via sendmany:
* No big logical changes, sendmany is called once for MP and once for AP
* Instead of paying out via sendtoaddress, store in array and use
sendmany later
* Update all transactions with the RPC TXID returned by sendmany
Will fix#1238 once merged.
* [ADDED] More methods to our transaction class
* `createDebitAPRecord` and `createDebitMPRecord`, will handle the
* entire debit process
* Adds Debit transaction
* Adds TXFee transaction
* mark transactions as archived
* validate user is fully paid out
* send notification to user
* `getMPQueue` was added to unify the process of getting payout queues
* [MOVED] Only one mail template for both payout methods
* [ADDED] Some minor calls to user class
* [ADDED] Full address validation to bitcoin class
* [SQL] New SQL upgrade and Version Increment
* Adding UNIQUE index to coin_address in accounts table
* preperation for `sendmany` implementation
* First debit the user fully for this transaction
* Try the payout RPC call
* Fail this so admins can first confirm it worked, then force payouts
* Added comment what line to remove if this happens a lot
This will further address #1586