corr costbasis prec in pricesinfo
This commit is contained in:
@@ -1344,8 +1344,8 @@ UniValue PricesInfo(uint256 bettxid, int32_t refheight)
|
|||||||
|
|
||||||
int64_t equity = totalbets + totalprofits;
|
int64_t equity = totalbets + totalprofits;
|
||||||
if (totalbets != 0) { //prevent zero div
|
if (totalbets != 0) { //prevent zero div
|
||||||
|
costbasis *= PRICES_POINTFACTOR; // save last 0.0000xxxx positions
|
||||||
costbasis /= totalbets;
|
costbasis /= totalbets;
|
||||||
costbasis *= PRICES_POINTFACTOR; //denormalization, last posiitons should be == 0000
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
costbasis = 0;
|
costbasis = 0;
|
||||||
|
|||||||
Reference in New Issue
Block a user