Skip to content

Commit e356d9a

Browse files
committed
Shorten variable names and switch to tx/s
1 parent 6dd8116 commit e356d9a

File tree

3 files changed

+8
-8
lines changed

3 files changed

+8
-8
lines changed

src/chainparams.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ class CMainParams : public CChainParams {
158158
1397080064, // * UNIX timestamp of last checkpoint block
159159
36544669, // * total number of transactions between genesis and last checkpoint
160160
// (the tx=... number in the SetBestChain debug.log lines)
161-
60000.0 // * estimated number of transactions per day after checkpoint
161+
0.7 // * estimated number of transactions per second after checkpoint
162162
};
163163
}
164164
};
@@ -242,7 +242,7 @@ class CTestNetParams : public CChainParams {
242242
chainTxData = ChainTxData{
243243
1337966069,
244244
1488,
245-
300
245+
0.0035
246246
};
247247

248248
}

src/chainparams.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,9 @@ struct CCheckpointData {
3131
};
3232

3333
struct ChainTxData {
34-
int64_t nTimeLastCheckpoint;
35-
int64_t nTransactionsLastCheckpoint;
36-
double fTransactionsPerDay;
34+
int64_t nTime;
35+
int64_t nTxCount;
36+
double dTxRate;
3737
};
3838

3939
/**

src/validation.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4150,10 +4150,10 @@ double GuessVerificationProgress(const ChainTxData& data, CBlockIndex *pindex) {
41504150

41514151
double fTxTotal;
41524152

4153-
if (pindex->nChainTx <= data.nTransactionsLastCheckpoint) {
4154-
fTxTotal = data.nTransactionsLastCheckpoint + (nNow - data.nTimeLastCheckpoint) / 86400.0 * data.fTransactionsPerDay;
4153+
if (pindex->nChainTx <= data.nTxCount) {
4154+
fTxTotal = data.nTxCount + (nNow - data.nTime) * data.dTxRate;
41554155
} else {
4156-
fTxTotal = pindex->nChainTx + (nNow - pindex->GetBlockTime()) / 86400.0 * data.fTransactionsPerDay;
4156+
fTxTotal = pindex->nChainTx + (nNow - pindex->GetBlockTime()) * data.dTxRate;
41574157
}
41584158

41594159
return pindex->nChainTx / fTxTotal;

0 commit comments

Comments
 (0)