Commit Graph

59 Commits

Author SHA1 Message Date
rog1121
ae5f6e4386 Cronsjobs Permissions 2014-03-01 18:04:31 -07:00
rog1121
93981f6044 Various Fixes 2014-03-01 17:57:43 -07:00
Sebastian Grewe
8d369d5ba4 [IMPROVED] Deduct TXFEE in Transaction CreateDebit
No need to deduct the fees on our cronjob, do it automatically in our
transaction class when creating a Debit record.
2014-02-27 15:19:01 +01:00
Sebastian Grewe
15d448e47e [FIX] Apply proper fee on auto-payouts
Thanks IRC blonkel for the heads up.
2014-02-27 15:19:01 +01:00
iAmShorty
15f7300195 [UPDATE] cleanup 2014-02-24 20:49:07 +01:00
iAmShorty
c6b060dbd5 [FIX] Newmint Payout Fix 2014-02-24 20:31:53 +01:00
Sebastian Grewe
8cb42aab2b Merge pull request #1770 from iAmShorty/realbalance-wrapper
[FIX] return balance from main account
2014-02-19 09:34:01 +01:00
Sebastian Grewe
7229b5b130 [ADDED] Payout Queue Limiter
* [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!
2014-02-18 09:16:26 +01:00
iAmShorty
a67b7a9615 Update payouts.php 2014-02-16 18:15:11 +01:00
iAmShorty
09e5bd72dc [UPDATE] changed logging 2014-02-16 18:07:27 +01:00
iAmShorty
6b8f1e6b52 [UPDATE] added logging information
looks good while doing payouts
```
2014-02-16 17:51:09 - INFO --> Starting Payout...
2014-02-16 17:51:09 - INFO --> Auto Payout Sum: 107.55535194 - Wallet Balance: 35779.26412985 with 4750.003 unconfirmed
2014-02-16 17:51:09 - INFO -->   found 1 queued auto payouts
2014-02-16 17:51:09 - INFO -->     | UserID     | Username                  | Balance              | Address                                  | Threshold            |
2014-02-16 17:51:09 - INFO -->     | 5          | shorty                    | 107.55535194         | MMRFkUnQSMDBQSMBG3QBBaEg4ixSa7ksDm       | 100                  |
2014-02-16 17:51:11 - INFO -->   payout succeeded with RPC TXID: 722fbd25bd02e08516cb49577c0a69f8aa51be6a6867047cb553b29085c238d3
```
2014-02-16 17:51:47 +01:00
iAmShorty
63ba74fc60 [UPDATE] balance fix for cron and wallet 2014-02-16 17:32:05 +01:00
iAmShorty
db5f731363 [UPDATE] typo 2014-02-16 16:36:56 +01:00
iAmShorty
e9b056df0f [ENHANCEMENT] add payout sum to log 2014-02-16 16:35:41 +01:00
Sebastian Grewe
6f1f56abb6 [ADDED] getrealbalance wrapper for payouts
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.
2014-02-14 17:21:52 +01:00
Sebastian Grewe
eb40e4080a [ADDED] Log RPC TXID into logfile for payouts 2014-02-12 16:21:24 +01:00
Sebastian Grewe
d725f9bf5d [ADDED] Sendmany config option
* Disable sendmany by default
* Allow people to enable the new feature via config
2014-02-12 16:21:24 +01:00
Sebastian Grewe
332aa5aaa4 [FIX] Apply TXFees before running sendmany 2014-02-12 16:21:24 +01:00
Sebastian Grewe
4359b6a649 [CHANGE] Made startup messages debug level 2014-02-12 16:21:24 +01:00
Sebastian Grewe
0e49e8440d [ADDED] First draft: sendmany RPC support
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.
2014-02-12 16:21:23 +01:00
Sebastian Grewe
9b5e9b6742 [FIX] Wrong Debit TX type on Manual Payout 2014-02-09 17:06:51 +01:00
Sebastian Grewe
bdaa4933fa [FIX] Cron error code for monitoring 2014-02-05 16:16:23 +01:00
Sebastian Grewe
499aa986c0 [FIX] Cron error code for monitoring 2014-02-05 16:15:18 +01:00
Sebastian Grewe
3747543424 [UPDATE] Check for wallet balance before starting payouts 2014-02-05 15:30:42 +01:00
Sebastian Grewe
c00b6d6757 [IMPROVED] Payout logics
* [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
2014-02-03 08:16:58 +01:00
Sebastian Grewe
6e23480434 [FIX] Use proper variable for error report 2014-01-29 08:58:35 +01:00
Sebastian Grewe
a0b36841c8 [FIX] Logic error 2014-01-27 12:30:26 +01:00
Sebastian Grewe
227a7c33de [FIX] Reset TX and RPCTX Ids 2014-01-27 10:39:19 +01:00
Sebastian Grewe
1cd9352952 [FIX] Transaction ID and RPC Transaction ID 2014-01-27 10:31:18 +01:00
Sebastian Grewe
72d923737f [WORKAROUND] Fully debit user before RPC call
* 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
2014-01-27 09:25:59 +01:00
root
0d5ee3ecd7 [UPDATE] adding user to log if no valid coin address set 2014-01-26 20:09:24 +01:00
root
10ad4eecdd [FIX] moved before balance check 2014-01-26 16:31:39 +01:00
root
71519d14d6 [FIX] checking payout address 2014-01-26 15:19:03 +01:00
Sebastian Grewe
1c94030c7b [FIX] Regression bug 2014-01-26 11:17:19 +01:00
Sebastian Grewe
8ca9744ce1 [CLEANUP] Coding style 2014-01-26 09:30:59 +01:00
Neozonz
c0004d8a4f [Look] Finally statisfied ;) 2014-01-24 10:22:35 -08:00
Neozonz
293a5944ca [Improved] Look 2014-01-24 10:22:35 -08:00
Neozonz
189578b18a [Improve] Wording 2014-01-24 10:22:35 -08:00
Neozonz
560a0f9f0f [Improved] Wording 2014-01-24 10:22:35 -08:00
Neozonz
3bd21a9372 [FIX] Tabbing
[Improved] Wording
[Improved] Logic of conditions
2014-01-24 10:22:35 -08:00
Neozonz
568033d939 [FIX] Woopsie 2014-01-24 10:22:34 -08:00
Neozonz
adb5910de8 [FIX] Whoops 2014-01-24 10:22:34 -08:00
Neozonz
dd14c3491e [FIX] Whoops 2014-01-24 10:22:34 -08:00
Neozonz
8f80cf09b3 [FIX] Indenting 2014-01-24 10:22:33 -08:00
Neozonz
d0e3a88e27 [FIX] Indenting 2014-01-24 10:22:33 -08:00
Neozonz
bf05935447 [FIX] Call correct getCronError functions 2014-01-24 10:22:33 -08:00
Neozonz
18d288fe50 [Enhance] PPS / Payout Crons - Improved logging and and improved fail safes
[Optimize] Removed Coin Daemon / RPC Address Validation
2014-01-24 10:21:01 -08:00
Neozonz
5a5bc255cc [Enhance] Improved logging
[Fix] Added error messaging to all
2014-01-24 10:21:01 -08:00
Sebastian Grewe
1dfbeea5f7 Merge pull request #1420 from TheSerapher/issue-1343
[IMPROVED] jsonRPC Error Handling with CURL
2014-01-16 06:15:42 -08:00
nicoschtein
618c50c49f Deduct fee to payout amount value on email notification 2014-01-15 15:57:22 -02:00