mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-02-10 10:52:31 -05:00
Shorten variable names and switch to tx/s
This commit is contained in:
parent
6dd81169fc
commit
e356d9a758
3 changed files with 8 additions and 8 deletions
|
@ -158,7 +158,7 @@ public:
|
||||||
1397080064, // * UNIX timestamp of last checkpoint block
|
1397080064, // * UNIX timestamp of last checkpoint block
|
||||||
36544669, // * total number of transactions between genesis and last checkpoint
|
36544669, // * total number of transactions between genesis and last checkpoint
|
||||||
// (the tx=... number in the SetBestChain debug.log lines)
|
// (the tx=... number in the SetBestChain debug.log lines)
|
||||||
60000.0 // * estimated number of transactions per day after checkpoint
|
0.7 // * estimated number of transactions per second after checkpoint
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
@ -242,7 +242,7 @@ public:
|
||||||
chainTxData = ChainTxData{
|
chainTxData = ChainTxData{
|
||||||
1337966069,
|
1337966069,
|
||||||
1488,
|
1488,
|
||||||
300
|
0.0035
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -31,9 +31,9 @@ struct CCheckpointData {
|
||||||
};
|
};
|
||||||
|
|
||||||
struct ChainTxData {
|
struct ChainTxData {
|
||||||
int64_t nTimeLastCheckpoint;
|
int64_t nTime;
|
||||||
int64_t nTransactionsLastCheckpoint;
|
int64_t nTxCount;
|
||||||
double fTransactionsPerDay;
|
double dTxRate;
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -4150,10 +4150,10 @@ double GuessVerificationProgress(const ChainTxData& data, CBlockIndex *pindex) {
|
||||||
|
|
||||||
double fTxTotal;
|
double fTxTotal;
|
||||||
|
|
||||||
if (pindex->nChainTx <= data.nTransactionsLastCheckpoint) {
|
if (pindex->nChainTx <= data.nTxCount) {
|
||||||
fTxTotal = data.nTransactionsLastCheckpoint + (nNow - data.nTimeLastCheckpoint) / 86400.0 * data.fTransactionsPerDay;
|
fTxTotal = data.nTxCount + (nNow - data.nTime) * data.dTxRate;
|
||||||
} else {
|
} else {
|
||||||
fTxTotal = pindex->nChainTx + (nNow - pindex->GetBlockTime()) / 86400.0 * data.fTransactionsPerDay;
|
fTxTotal = pindex->nChainTx + (nNow - pindex->GetBlockTime()) * data.dTxRate;
|
||||||
}
|
}
|
||||||
|
|
||||||
return pindex->nChainTx / fTxTotal;
|
return pindex->nChainTx / fTxTotal;
|
||||||
|
|
Loading…
Add table
Reference in a new issue