mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-01-12 04:42:36 -03:00
Merge pull request #2453 from sipa/txstats
Update transaction statistics
This commit is contained in:
commit
1c4f02139c
2 changed files with 11 additions and 10 deletions
|
@ -15,11 +15,11 @@ namespace Checkpoints
|
||||||
typedef std::map<int, uint256> MapCheckpoints;
|
typedef std::map<int, uint256> MapCheckpoints;
|
||||||
|
|
||||||
// How many times we expect transactions after the last checkpoint to
|
// How many times we expect transactions after the last checkpoint to
|
||||||
// be slower. This number is conservative. On multi-core CPUs with
|
// be slower. This number is a compromise, as it can't be accurate for
|
||||||
// parallel signature checking enabled, this number is way too high.
|
// every system. When reindexing from a fast disk with a slow CPU, it
|
||||||
// We prefer a progressbar that's faster at the end than the other
|
// can be up to 20, while when downloading from a slow network with a
|
||||||
// way around, though.
|
// fast multicore CPU, it won't be much higher than 1.
|
||||||
static const double fSigcheckVerificationFactor = 15.0;
|
static const double fSigcheckVerificationFactor = 5.0;
|
||||||
|
|
||||||
struct CCheckpointData {
|
struct CCheckpointData {
|
||||||
const MapCheckpoints *mapCheckpoints;
|
const MapCheckpoints *mapCheckpoints;
|
||||||
|
@ -48,10 +48,10 @@ namespace Checkpoints
|
||||||
;
|
;
|
||||||
static const CCheckpointData data = {
|
static const CCheckpointData data = {
|
||||||
&mapCheckpoints,
|
&mapCheckpoints,
|
||||||
1357902690, // * UNIX timestamp of last checkpoint block
|
1363044259, // * UNIX timestamp of last checkpoint block
|
||||||
11011160, // * total number of transactions between genesis and last checkpoint
|
14264869, // * 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)
|
||||||
50000.0 // * estimated number of transactions per day after checkpoint
|
60000.0 // * estimated number of transactions per day after checkpoint
|
||||||
};
|
};
|
||||||
|
|
||||||
static MapCheckpoints mapCheckpointsTestnet =
|
static MapCheckpoints mapCheckpointsTestnet =
|
||||||
|
|
|
@ -1868,9 +1868,10 @@ bool SetBestChain(CValidationState &state, CBlockIndex* pindexNew)
|
||||||
bnBestChainWork = pindexNew->bnChainWork;
|
bnBestChainWork = pindexNew->bnChainWork;
|
||||||
nTimeBestReceived = GetTime();
|
nTimeBestReceived = GetTime();
|
||||||
nTransactionsUpdated++;
|
nTransactionsUpdated++;
|
||||||
printf("SetBestChain: new best=%s height=%d work=%s tx=%lu date=%s\n",
|
printf("SetBestChain: new best=%s height=%d work=%s tx=%lu date=%s progress=%f\n",
|
||||||
BlockHashStr(hashBestChain).c_str(), nBestHeight, bnBestChainWork.ToString().c_str(), (unsigned long)pindexNew->nChainTx,
|
BlockHashStr(hashBestChain).c_str(), nBestHeight, bnBestChainWork.ToString().c_str(), (unsigned long)pindexNew->nChainTx,
|
||||||
DateTimeStrFormat("%Y-%m-%d %H:%M:%S", pindexBest->GetBlockTime()).c_str());
|
DateTimeStrFormat("%Y-%m-%d %H:%M:%S", pindexBest->GetBlockTime()).c_str(),
|
||||||
|
Checkpoints::GuessVerificationProgress(pindexBest));
|
||||||
|
|
||||||
// Check the version of the last 100 blocks to see if we need to upgrade:
|
// Check the version of the last 100 blocks to see if we need to upgrade:
|
||||||
if (!fIsInitialDownload)
|
if (!fIsInitialDownload)
|
||||||
|
|
Loading…
Reference in a new issue