MCPcopy Create free account
hub / github.com/ElementsProject/elements / AddToCompactExtraTransactions

Method AddToCompactExtraTransactions

src/net_processing.cpp:1348–1357  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1346}
1347
1348void PeerManagerImpl::AddToCompactExtraTransactions(const CTransactionRef& tx)
1349{
1350 size_t max_extra_txn = gArgs.GetIntArg("-blockreconstructionextratxn", DEFAULT_BLOCK_RECONSTRUCTION_EXTRA_TXN);
1351 if (max_extra_txn <= 0)
1352 return;
1353 if (!vExtraTxnForCompact.size())
1354 vExtraTxnForCompact.resize(max_extra_txn);
1355 vExtraTxnForCompact[vExtraTxnForCompactIt] = std::make_pair(tx->GetWitnessHash(), tx);
1356 vExtraTxnForCompactIt = (vExtraTxnForCompactIt + 1) % max_extra_txn;
1357}
1358
1359void PeerManagerImpl::Misbehaving(const NodeId pnode, const int howmuch, const std::string& message)
1360{

Callers

nothing calls this directly

Calls 3

GetIntArgMethod · 0.80
sizeMethod · 0.45
resizeMethod · 0.45

Tested by

no test coverage detected