Commit Graph

718 Commits

Author SHA1 Message Date
iAmShorty
f891743aed [FIX] fixed calculation 2014-03-03 08:50:12 +01:00
iAmShorty
863dbb56eb [FIX] fixed nethashrate for some coins 2014-03-03 08:41:44 +01:00
rog1121
639d4ccb10 Fix Notifications Class 2014-03-01 17:00:51 -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
bbba9d1daf Merge pull request #1837 from MPOS/unified-user-miningstats
Unified user miningstats
2014-02-26 09:53:41 +01:00
Sebastian Grewe
3e64dd3487 Merge pull request #1798 from MPOS/x-forwarded-for-check
[CHANGED] Parse X-FORWARDED-FOR when supplied
2014-02-26 09:53:29 +01:00
Sebastian Grewe
d750e81b02 [FIX] Wait for global cache data, don't run queries 2014-02-26 09:42:49 +01:00
Sebastian Grewe
78619c1427 [IMPROVED] Unified user speed statistics
* [ADDED] getUserMiningStats to fetch all speed related data
 * Uses global cache if available, falls back to local query and then
   local caches
* [REMOVED] getUserHashrate, getUserSharerate, getUserAvgShareDifficulty
* [UPDATED] All code occurences for the above to use the new system

Probably won't change much since global cache was already used but does
help on the Dashboard since we combine at least 2 calls into one.
2014-02-26 09:27:32 +01:00
Sebastian Grewe
b2f555a83a Merge pull request #1820 from iAmShorty/users-registered
[UPDATE] Adding registrations and Regdate to Admin Dashboard and Userinfo
2014-02-24 15:02:55 +01:00
Sebastian Grewe
dc1fe9aa35 Merge pull request #1799 from MPOS/debug-to-logfile
[IMPROVED] Allow debug console log to logfile
2014-02-24 11:26:43 +01:00
iAmShorty
55266e274a [UPDATE] added pagination to reg and invite 2014-02-24 11:24:13 +01:00
iAmShorty
0f9cdb915c [UPDATE] fixed typo in sql queries 2014-02-24 10:58:23 +01:00
iAmShorty
d419b1f0ff [UPDATE] sorting by count 2014-02-24 10:56:47 +01:00
iAmShorty
37b8d5a56b [UPDATE] changed hardcoded table names 2014-02-24 10:52:12 +01:00
iAmShorty
fbdd811d7f [UPDATE] added top inviter, some code cleanup 2014-02-24 10:39:09 +01:00
iAmShorty
d0a82be11b [UPDATE] adding if user was invited and inviter to registered users 2014-02-23 22:30:52 +01:00
iAmShorty
23afae0aaf [UPDATE] added last 10 registered users to dashboard 2014-02-23 21:35:20 +01:00
iAmShorty
c5ff564deb [FIX] Wallet Balance 2014-02-20 20:59:54 +01:00
Sebastian Grewe
865cd96f5e [IMPROVED] Allow debug console log to logfile
* Needs logging level set to 7 in security config
* Needs debugging enabled in global config
2014-02-20 09:01:18 +01:00
Sebastian Grewe
8bd469ba5d [CHANGED] Parse X-FORWARDED-FOR when supplied
Instead of trusting REMOTE_ADDR we should parse X-FORWARDED-FOR if
supplied. This will properly use the user IP in a multi-LB setup.

Needs testing
2014-02-19 14:32:20 +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
d2be015554 [FIX] return balance from main account 2014-02-16 16:44:36 +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
d1f3f5d01d [UPDATE] Return negative balance if main is negative 2014-02-15 19:17:12 +01:00
iAmShorty
b0baa29a1f [FIX] fix for negative balance
using php abs() should do the trick with negative balance
2014-02-14 21:03:30 +01:00
iAmShorty
691e1e60cb Update bitcoinwrapper.class.php 2014-02-14 20:49:42 +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
d7f2e6e5ac [UPDATE] ACL Management
* [ADDED] Smarty acl_check function
* [ADDED] Optional default return  value for getValue calls
* [UPDATE] ACL Checks in page controllers
* [UPDATE] Navigation template to use check_acl from Smarty
* [ADDED] New ACL options where needed
* [REMOVED] Disable pages from System Settings Tab
* [ADDED] Above removed pages into ACL Settings Tab

This will make usage of ACLs a bit easier and transparent.
Also fixes #1731 once merged.
2014-02-14 10:56:25 +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
71aca7e0af [UPDATE] Getbalance wrapper
We need to wrap our getbalance call due to issues in the coind and
payout systems in the RPC. Apparently it's having issues with multiple
accounts setup in a single wallet. Sendmany can not properly use other
accounts added to the wallet as the payout account.

Hence we wrap our getbalance call in the RPC and only return the default
account balance at all times. Since this is used for all payouts and for
payments from blocks, there should be no issue. Those pools running
multiple accounts in their wallet will have to move their coins into the
default wallet!
2014-02-12 16:21:24 +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
Sebastian Grewe
975b41276d [ADDED] New memcache option for contrib caches 2014-02-12 08:07:58 +01:00
Sebastian Grewe
cb4211a618 Merge pull request #1732 from MPOS/no-txfee-check
[FIX] Do not add TXFee with txfee 0
2014-02-12 07:33:15 +01:00
Sebastian Grewe
c622d7c69b Merge pull request #1726 from j4s0n/fix/next/issue-1725
(#1725) Fix cold wallet check FP and added testnet detection
2014-02-11 19:38:08 +01:00
Sebastian Grewe
9039eb29dc [FIX] Do not add TXFee with txfee 0 2014-02-11 16:35:01 +01: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
j4s0n
8c3205a8b2 (#1725) Fix cold wallet check FP and added testnet detection
Without this patch, admin.php checks if it can connect to the wallet service. Regardless of if that check passes or fails, it then checks if the cold wallet address is valid. If the can_connect() test failed, the validateaddress() check will also fail, even if the address is not invalid. To fix this, the validateaddress() check is move to an elseif block in the can_connect() chain.

Additionally, this patch checks to see if the wallet service is running as a testnet. While running as a testnet is perfectly acceptable when testing, the suer should be warned. A lot of folks using the quickstart guide miss this.

A function was added to the Bitcoin class to detect when we are running in a test net. A check was added to admin.php, and the existing can_connect and validateaddress() calls were restructured to solve these issues.
2014-02-10 12:07:08 -05:00
Sebastian Grewe
a9d9fe4b64 [FIX] Proper fix for Payout ID # 2014-02-10 09:47:40 +01:00
Sebastian Grewe
19fc975d95 [FIX] Insert ID of Payout Request 2014-02-09 17:46:25 +01:00
Sebastian Grewe
08a3200b75 [FIX] Fallback to fixed reward without blocks 2014-02-08 13:46:21 +01:00
Sebastian Grewe
5d65f04515 Merge pull request #1695 from MPOS/reward-average
[ADDED] Use block averages for payout estimates
2014-02-07 13:48:07 +01:00
Sebastian Grewe
ed0be8ec47 [UPGRADE] Upgraded KLogger Library
* [REMOVED] Logfile name not possible right now
* [ADDED] All loglevels supplied by KLogger
2014-02-07 13:40:50 +01:00
Sebastian Grewe
2a8927af8f [IMPROVED] Check if cron is running in PHP scripts
* Ensures we don't spawn more than one PHP process
* Will require admin-intervention to reset the cron_active flag in DB

Shouldn't trigger often but may help people.
2014-02-07 13:00:05 +01:00
Sebastian Grewe
6a55506b0c [IMPROVED] Logging format
* Added IP address to all log output
* Added Page and Action to all log output
* Modified log messages
* Added Error and Fatal handlers
* Raised failed logins to Error
* Added KLogger default log levels
* Made it most verbose
2014-02-07 10:14:56 +01:00
Sebastian Grewe
a03b9d4ace [ADDED] JSONP support for MPOS API
Fixes #1700 once merged.

Thanks @spliznork for the feature request and solution.
2014-02-07 09:00:09 +01:00
Sebastian Grewe
93470fd63e [FIX] Suppress potential empty HTTP_USER_AGENT 2014-02-06 16:34:06 +01:00
Sebastian Grewe
baaf8bf6eb [IMPROVED] Skip contrib shares until cache available
* Will help larger pools
* Will fallback to SQL if memcache is disabled
2014-02-06 14:38:38 +01:00
Sebastian Grewe
3deaf82f1e [ADDED] Use block averages for payout estimates
Fixes #1514 once merged.
2014-02-06 11:38:57 +01:00