Merge cf5bb048e8 into merged_master (Bitcoin PR bitcoin/bitcoin#22932)

This commit is contained in:
Byron Hambly 2023-06-28 17:12:24 +00:00
commit 063acc7793
13 changed files with 80 additions and 51 deletions

View file

@ -1884,7 +1884,7 @@ void PeerManagerImpl::ProcessGetBlockData(CNode& pfrom, Peer& peer, const CInv&
// Fast-path: in this case it is possible to serve the block directly from disk,
// as the network format matches the format on disk
std::vector<uint8_t> block_data;
if (!ReadRawBlockFromDisk(block_data, pindex, m_chainparams.MessageStart())) {
if (!ReadRawBlockFromDisk(block_data, pindex->GetBlockPos(), m_chainparams.MessageStart())) {
assert(!"cannot load block from disk");
}
m_connman.PushMessage(&pfrom, msgMaker.Make(NetMsgType::BLOCK, Span{block_data}));