Index: src/net_processing.cpp =================================================================== --- src/net_processing.cpp +++ src/net_processing.cpp @@ -22,7 +22,6 @@ #include "primitives/block.h" #include "primitives/transaction.h" #include "random.h" -#include "serialize.h" #include "tinyformat.h" #include "txmempool.h" #include "ui_interface.h" @@ -3503,7 +3502,7 @@ LOCK(pto->cs_inventory); vInv.reserve(std::max(pto->vInventoryBlockToSend.size(), INVENTORY_BROADCAST_MAX_PER_MB * - MAX_SIZE / 1000000)); + config.GetMaxBlockSize() / 1000000)); // Add blocks for (const uint256 &hash : pto->vInventoryBlockToSend) { @@ -3595,8 +3594,9 @@ unsigned int nRelayedTransactions = 0; LOCK(pto->cs_filter); while (!vInvTx.empty() && - nRelayedTransactions < - INVENTORY_BROADCAST_MAX_PER_MB * MAX_SIZE / 1000000) { + nRelayedTransactions < INVENTORY_BROADCAST_MAX_PER_MB * + config.GetMaxBlockSize() / + 1000000) { // Fetch the top element from the heap std::pop_heap(vInvTx.begin(), vInvTx.end(), compareInvMempoolOrder);