diff options
| author | Matt Corallo <[email protected]> | 2017-01-12 12:19:14 -0800 |
|---|---|---|
| committer | Matt Corallo <[email protected]> | 2017-01-12 12:19:14 -0800 |
| commit | b55b4163462756cbb2341294b839a881333d8f1e (patch) | |
| tree | e6f6baa895c098e7181263579bd3b7fd8e4b6369 /src/blockencodings.cpp | |
| parent | Consider all (<100k memusage) txn for compact-block-extra-txn cache (diff) | |
| download | discoin-b55b4163462756cbb2341294b839a881333d8f1e.tar.xz discoin-b55b4163462756cbb2341294b839a881333d8f1e.zip | |
Add extra_count lower bound to compact reconstruction debug print
Diffstat (limited to 'src/blockencodings.cpp')
| -rw-r--r-- | src/blockencodings.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/blockencodings.cpp b/src/blockencodings.cpp index 43b4cb9b8..c27cde216 100644 --- a/src/blockencodings.cpp +++ b/src/blockencodings.cpp @@ -141,6 +141,7 @@ ReadStatus PartiallyDownloadedBlock::InitData(const CBlockHeaderAndShortTxIDs& c txn_available[idit->second] = extra_txn[i].second; have_txn[idit->second] = true; mempool_count++; + extra_count++; } else { // If we find two mempool txn that match the short id, just request it. // This should be rare enough that the extra bandwidth doesn't matter, @@ -151,6 +152,7 @@ ReadStatus PartiallyDownloadedBlock::InitData(const CBlockHeaderAndShortTxIDs& c txn_available[idit->second]->GetWitnessHash() != extra_txn[i].second->GetWitnessHash()) { txn_available[idit->second].reset(); mempool_count--; + extra_count--; } } } @@ -206,7 +208,7 @@ ReadStatus PartiallyDownloadedBlock::FillBlock(CBlock& block, const std::vector< return READ_STATUS_CHECKBLOCK_FAILED; } - LogPrint("cmpctblock", "Successfully reconstructed block %s with %lu txn prefilled, %lu txn from mempool and %lu txn requested\n", hash.ToString(), prefilled_count, mempool_count, vtx_missing.size()); + LogPrint("cmpctblock", "Successfully reconstructed block %s with %lu txn prefilled, %lu txn from mempool (incl at least %lu from extra pool) and %lu txn requested\n", hash.ToString(), prefilled_count, mempool_count, extra_count, vtx_missing.size()); if (vtx_missing.size() < 5) { for (const auto& tx : vtx_missing) LogPrint("cmpctblock", "Reconstructed block %s required tx %s\n", hash.ToString(), tx->GetHash().ToString()); |