aboutsummaryrefslogtreecommitdiff
path: root/src/validation.cpp
diff options
context:
space:
mode:
authorPieter Wuille <pieter.wuille@gmail.com>2017-01-04 07:35:39 -0800
committerPieter Wuille <pieter.wuille@gmail.com>2017-01-11 08:21:37 -0800
commite356d9a758fff44841c0a630ef6b048de05e53f0 (patch)
tree39ef7e8da308218dfe54b1c458e1d743cea933b5 /src/validation.cpp
parent6dd81169fc33f0c9720afe0b9b52ed4539e59580 (diff)
Shorten variable names and switch to tx/s
Diffstat (limited to 'src/validation.cpp')
-rw-r--r--src/validation.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/validation.cpp b/src/validation.cpp
index 0ff9a00254..f9b1cd52ec 100644
--- a/src/validation.cpp
+++ b/src/validation.cpp
@@ -4150,10 +4150,10 @@ double GuessVerificationProgress(const ChainTxData& data, CBlockIndex *pindex) {
double fTxTotal;
- if (pindex->nChainTx <= data.nTransactionsLastCheckpoint) {
- fTxTotal = data.nTransactionsLastCheckpoint + (nNow - data.nTimeLastCheckpoint) / 86400.0 * data.fTransactionsPerDay;
+ if (pindex->nChainTx <= data.nTxCount) {
+ fTxTotal = data.nTxCount + (nNow - data.nTime) * data.dTxRate;
} else {
- fTxTotal = pindex->nChainTx + (nNow - pindex->GetBlockTime()) / 86400.0 * data.fTransactionsPerDay;
+ fTxTotal = pindex->nChainTx + (nNow - pindex->GetBlockTime()) * data.dTxRate;
}
return pindex->nChainTx / fTxTotal;