-
Notifications
You must be signed in to change notification settings - Fork 1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[FIX] return balance from main account #1770
Conversation
We can't - this will include unconfirmed balance again and break the payout later down the road if we try to with unmatured coins. |
ahhh, right, forgot that. will try to cover that and push a new one |
maybe like this? will do further tests and research, but i think that's the only real solution to check the unconfirmed blocks before doing payouts and without falling into negative balance if funds from other accounts in wallet are higher than funds in default account. |
dBalance on wallet info page may already be total without unconfirmed, you remove the unconfirmed then and will probably reduce the amount a fair bit depending in the total unconfirmed amount. Not sure but doesn't look clean either :-/ we shall chat tomorrow, maybe it just needs proper documentation. |
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 ```
looks good
|
Sick today but maybe on - depends how I feel later. |
no problem, get well soon... |
[FIX] return balance from main account
Thanks @iAmShorty , I also see no other way than doing some block/account magic. |
return only the balance from main account.
calculation confuses users
tested with 2 accounts in wallet, default account has funds of 40,000 and second account has 80,000. so there are liquid funds of 40,000 coins, but substracting 80,000 from main account makes the balance negative and payouts fail. better to return only the balance from default account without substracting the funds from other accounts. doesn't matter if there are funds in other accounts, when liquid funds in default account are enough to payout users.