Commit Graph

23 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
iAmShorty
c5ff564deb [FIX] Wallet Balance 2014-02-20 20:59:54 +01:00
iAmShorty
d2be015554 [FIX] return balance from main account 2014-02-16 16:44:36 +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
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
bea6477cb0 [UPDATE] Cache getmininginfo too 2014-02-05 17:21:13 +01:00
xisi
568445845a changes DEBUG SALT and SALTY from defines to variables
switched that in all places used (class loads mostly)
moved all includes at the beginning of index into bootstrap
moves *_PATH defines from config to bootstrap
config now uses defaults first, then user config
2014-01-29 07:34:50 -05:00
xisi
b728b680ca blah blah 2014-01-28 07:26:08 -05:00
Sebastian Grewe
610e564c2f [IMPROVED] Further improvements on error handling 2014-01-15 16:28:26 +01:00
drainx
5a1c693fa6 Move from XML-RPC to JSON-RPC. 2014-01-06 17:34:54 -06:00
Sebastian Grewe
eec52b7e4a [UPDATE] Cache RPC getinfo calls 2013-12-07 13:32:57 +01:00
Sebastian Grewe
d95961b470 [FIX] Coins without nethashrate in getmininginfo
Fixes issues with coins that did not implement a proper array index into
their `getmininginfo` output. Currently supported keys are

* networkhashps
* hashespersec
* netmhashps

If none of there are found or `getmininginfo` fails itself, we now
default to `0` to ensure the webfrontend still works.

Fixes #847 and also fixes #834 which has not reported back the
required information.
2013-11-16 20:39:41 +01:00
Sebastian Grewe
d74770aaeb [FIX] Proper formatting for network hashrates 2013-09-30 13:50:13 +02:00
Sebastian Grewe
594b2c0e10 [FIX] Network Hashrate on Novacoin 2013-09-30 13:43:27 +02:00
Sebastian Grewe
abcd62d8e8 Fix #657, added getmininginfo to wrapper 2013-09-25 11:31:42 +02:00
Sebastian Grewe
bbe39228e1 Bitcoin Wrapper improvements
* [FEATURE] Allow for PoS/PoW Detecion in getdifficulty
* [FEATURE] Allow for SHA detecion in getnetworkhashps
* [IMRPOVEMENT] Added caching for bitcoin values (30s only)
 * Will reduce the amount of RPC calls for high load pages
2013-09-17 09:36:08 +02:00
Sebastian Grewe
b5ab1a02fb Adding more in-line documentation and some cleanup 2013-05-30 09:55:21 +02:00
Sebastian Grewe
510ce89338 Use new BitcoinWrapper class, remove memcache calls 2013-05-28 11:50:37 +02:00
Sebastian Grewe
d4331ed8dc Adding more actions for API page
* getblockcount
* getblocksfound (with limit support)
* getcurrentworkers
* getdifficulty
* getestimatedtime
* getpoolhashrate
* getpoolsharerate
* gettimesincelastblock
2013-05-28 10:50:16 +02:00