aboutsummaryrefslogtreecommitdiff
path: root/src/blockencodings.h
diff options
context:
space:
mode:
authorWladimir J. van der Laan <laanwj@gmail.com>2017-01-19 09:02:26 +0100
committerWladimir J. van der Laan <laanwj@gmail.com>2017-01-19 09:03:46 +0100
commit9c9af5ab2d9e461bb6f2dee1390025ce82a3625b (patch)
treea734a1ec64e61595aa7bad3fc114ecb18b896dc8 /src/blockencodings.h
parent6012967c4746095e6f66a142cb9f639544c17377 (diff)
parentc5945804ca7e5edd9fce8c6de9b1f0ef775f9e79 (diff)
downloadbitcoin-9c9af5ab2d9e461bb6f2dee1390025ce82a3625b.tar.xz
Merge #9499: Use recent-rejects, orphans, and recently-replaced txn for compact-block-reconstruction
c594580 Add braces around AddToCompactExtraTransactions (Matt Corallo) 1ccfe9b Clarify comment about mempool/extra conflicts (Matt Corallo) fac4c78 Make PartiallyDownloadedBlock::InitData's second param const (Matt Corallo) b55b416 Add extra_count lower bound to compact reconstruction debug print (Matt Corallo) 863edb4 Consider all (<100k memusage) txn for compact-block-extra-txn cache (Matt Corallo) 7f8c8ca Consider all orphan txn for compact-block-extra-txn cache (Matt Corallo) 93380c5 Use replaced transactions in compact block reconstruction (Matt Corallo) 1531652 Keep shared_ptrs to recently-replaced txn for compact blocks (Matt Corallo) edded80 Make ATMP optionally return the CTransactionRefs it replaced (Matt Corallo) c735540 Move ORPHAN constants from validation.h to net_processing.h (Matt Corallo)
Diffstat (limited to 'src/blockencodings.h')
-rw-r--r--src/blockencodings.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/blockencodings.h b/src/blockencodings.h
index 809ccbf936..281db9fe01 100644
--- a/src/blockencodings.h
+++ b/src/blockencodings.h
@@ -194,13 +194,14 @@ public:
class PartiallyDownloadedBlock {
protected:
std::vector<CTransactionRef> txn_available;
- size_t prefilled_count = 0, mempool_count = 0;
+ size_t prefilled_count = 0, mempool_count = 0, extra_count = 0;
CTxMemPool* pool;
public:
CBlockHeader header;
PartiallyDownloadedBlock(CTxMemPool* poolIn) : pool(poolIn) {}
- ReadStatus InitData(const CBlockHeaderAndShortTxIDs& cmpctblock);
+ // extra_txn is a list of extra transactions to look at, in <witness hash, reference> form
+ ReadStatus InitData(const CBlockHeaderAndShortTxIDs& cmpctblock, const std::vector<std::pair<uint256, CTransactionRef>>& extra_txn);
bool IsTxAvailable(size_t index) const;
ReadStatus FillBlock(CBlock& block, const std::vector<CTransactionRef>& vtx_missing);
};