|
|
@ -928,12 +928,14 @@ void RPC::getInfoThenRefresh(bool force) { |
|
|
|
luck->display( QString("-") ); |
|
|
|
} else { |
|
|
|
// luck = current estimate of time to find a block given current localhash and nethash
|
|
|
|
double percentOfNetHash = localhashps.toDouble() / networkhashps.toInt(); |
|
|
|
//TODO: maybe use this as a tooltip
|
|
|
|
double percentOfNetHash = localhashps.toDouble() / networkhashps.toDouble(); |
|
|
|
DEBUG( "% of nethash=" << percentOfNetHash ); |
|
|
|
if (percentOfNetHash > 0) { |
|
|
|
|
|
|
|
if (localhashps.toDouble() > 0) { |
|
|
|
//TODO: this is only for DRAGONX
|
|
|
|
int blocktime = 36; |
|
|
|
double luckInSeconds = (1/percentOfNetHash)*blocktime; |
|
|
|
double luckInSeconds = (networkhashps.toDouble()/localhashps.toDouble())*blocktime; |
|
|
|
double luckInHours = luckInSeconds / (60*60); |
|
|
|
luck->display( QString::number( luckInHours , 'f', 2 ) ); |
|
|
|
} |
|
|
|