Skip to content

Commit fac4c78

Browse files
committed
Make PartiallyDownloadedBlock::InitData's second param const
1 parent b55b416 commit fac4c78

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/blockencodings.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ uint64_t CBlockHeaderAndShortTxIDs::GetShortID(const uint256& txhash) const {
4747

4848

4949

50-
ReadStatus PartiallyDownloadedBlock::InitData(const CBlockHeaderAndShortTxIDs& cmpctblock, std::vector<std::pair<uint256, CTransactionRef>>& extra_txn) {
50+
ReadStatus PartiallyDownloadedBlock::InitData(const CBlockHeaderAndShortTxIDs& cmpctblock, const std::vector<std::pair<uint256, CTransactionRef>>& extra_txn) {
5151
if (cmpctblock.header.IsNull() || (cmpctblock.shorttxids.empty() && cmpctblock.prefilledtxn.empty()))
5252
return READ_STATUS_INVALID;
5353
if (cmpctblock.shorttxids.size() + cmpctblock.prefilledtxn.size() > MAX_BLOCK_BASE_SIZE / MIN_TRANSACTION_BASE_SIZE)

src/blockencodings.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,7 @@ class PartiallyDownloadedBlock {
201201
PartiallyDownloadedBlock(CTxMemPool* poolIn) : pool(poolIn) {}
202202

203203
// extra_txn is a list of extra transactions to look at, in <witness hash, reference> form
204-
ReadStatus InitData(const CBlockHeaderAndShortTxIDs& cmpctblock, std::vector<std::pair<uint256, CTransactionRef>>& extra_txn);
204+
ReadStatus InitData(const CBlockHeaderAndShortTxIDs& cmpctblock, const std::vector<std::pair<uint256, CTransactionRef>>& extra_txn);
205205
bool IsTxAvailable(size_t index) const;
206206
ReadStatus FillBlock(CBlock& block, const std::vector<CTransactionRef>& vtx_missing);
207207
};

0 commit comments

Comments
 (0)