Commit Graph

388 Commits

Author SHA1 Message Date
Sebastian Grewe
a1dbe8bb09 [FIX] Workaround for missing confirmations
This will fix issues with those coins that don't track confirmations for
blocks inside the getblock RPC call. It will try to fallback to the
transactions confirmations and insert those instead.

Fixes #1823 as mentioned by @ice00 - Thanks for that!
2014-03-03 09:42:36 +01:00
Sebastian Grewe
aac80502e1 [FIX] Bail findblocks on block insertion errors
Fixes #1857 once merged.
2014-02-28 09:09:29 +01: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
63a6672cd2 Merge pull request #1782 from MPOS/payout-tx-limit
[ADDED] Payout Queue Limiter
2014-02-19 09:12:24 +01:00
Sebastian Grewe
dbbd57c761 [FIX] Wrong method call in tickerupdate 2014-02-18 19:00:16 +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
4be9ae288b [ADDED] Block height to prop payouts
So the payout indicates what block is being paid out.
2014-02-16 10:12:27 +01:00
Sebastian Grewe
cdaf757b8b Merge branch 'next' of github.com:MPOS/php-mpos into next 2014-02-16 08:32:10 +01:00
Sebastian Grewe
6f5d866bb9 [ADDED] Force run even if cron is active with -f 2014-02-16 08:31:47 +01:00
Sebastian Grewe
5c22cc3c08 Merge pull request #1764 from MPOS/combine-cleanups
[IMPROVED] Combined cleanup tasks into single PHP
2014-02-16 08:12:11 +01:00
Sebastian Grewe
5dd13d4475 Merge pull request #1757 from MPOS/getrealbalance-wrapper
[ADDED] getrealbalance wrapper for payouts
2014-02-16 08:11:08 +01:00
Sebastian Grewe
71162d0d67 Merge pull request #1763 from MPOS/log-formatting
Log formatting
2014-02-15 19:19:26 +01:00
Sebastian Grewe
146b56259b [IMPROVED] Combined cleanup tasks into single PHP
* [IMPROVED] Logging format for all cleanup tasks
* [UPDATED] Cron shellescripts
* [UPDATE] Cron Monitoring Page
* [DELETED] Old `*_cleanup.php` scripts
2014-02-15 19:01:25 +01:00
Sebastian Grewe
e36060cd2e [IMPROVED] Tickerupdate log format 2014-02-15 18:44:00 +01:00
Sebastian Grewe
35910ef097 [IMPROVED] Statistics log format 2014-02-15 18:32:39 +01:00
Sebastian Grewe
e46036325c [IMPROVED] PPS payout log format 2014-02-15 18:17:12 +01:00
Sebastian Grewe
1d5acb48b2 [FIX] Wrong argument count 2014-02-15 18:16:57 +01:00
Sebastian Grewe
f62a47dd2c [FIX] Abort cron on locking failure
Fixes #1762
2014-02-15 17:54:20 +01:00
Sebastian Grewe
ee805b65ce [IMPROVED] PPLNS payout log format 2014-02-15 17:10:58 +01:00
Sebastian Grewe
950e607230 [IMPROVED] Proportional payout log format 2014-02-15 17:10:45 +01:00
Sebastian Grewe
aab216e117 [IMPROVED] Blockupdate log format 2014-02-15 15:57:53 +01:00
Sebastian Grewe
93b7fb6de2 [IMPROVED] Findblocks log formatting 2014-02-15 15:43:13 +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
iAmShorty
8046b5225f [FIX] permissions 2014-02-14 17:11:29 +01:00
iAmShorty
2ac6540a8f [FIX] removed from cronjob 2014-02-14 17:10:27 +01:00
Sebastian Grewe
a083b1c272 [REMOVED] Liquid Payout cron due to issues
Payouts did not work very well and caused more issues for pools than
being worth having this cron. We revert this and let them use
sendtoaddress again whenever they wish to deduct payouts from their pool
at their own discretion.

We may add this thing back in sometime later with a proper and working
implementation but no promises.
2014-02-14 11:39:11 +01:00
Sebastian Grewe
f43a5214c4 [FIX] PPS Payout processing
* [ADDED] Abort if we don't have enough shares to calculate PPS from
* [FIXED] Proper calculations for account shares, we dropped a share
  each run
* [ADDED] Error code if no new shares available
2014-02-14 10:55:17 +01:00
Sebastian Grewe
6f706b883d Merge branch 'next' of github.com:MPOS/php-mpos into next 2014-02-14 09:42:16 +01:00
Sebastian Grewe
6d52f5d47c [FIX] Added missing file, gitignore :/ 2014-02-14 09:42:03 +01:00
Sebastian Grewe
682beb60d1 Merge pull request #1739 from MPOS/notification-cleanup
[ADDED] Notification cleanup script
2014-02-14 08:56:51 +01:00
Sebastian Grewe
bb2037d813 Merge pull request #1753 from andymornes/next
[FIX] Correcting user ID for new block emails
2014-02-14 06:34:51 +01:00
Andy Mornes
ac3bea9f1a [FIX] Correcting user ID for new block emails
Also adding the currency to the notifications as well.
2014-02-13 13:26:48 -06: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
5f48d2dabc [ADDED] Notification cleanup script
* [ADDED] Admin Panel Setting for max age for notifications
* [ADDED] Cronjob to clean out old notifications
* [ADDED] New cron to scripts and monitoring

Fixes #1672 once merged.
2014-02-12 10:47:42 +01:00
Andy Mornes
91a57903ce New Block Notification additions
Adding the block number, finder, amount, and difficulty to the new block
notification email
2014-02-12 00:18:00 -06:00
Sebastian Grewe
0cf6e38dc3 Merge pull request #1705 from MPOS/cron-check-active
[IMPROVED] Check if cron is running in PHP scripts
2014-02-10 21:57:28 +01:00