Skip to content

Commit

Permalink
net: Do not attempt to read raw blocks from disk
Browse files Browse the repository at this point in the history
  • Loading branch information
lateminer committed Sep 14, 2024
1 parent 9c1ac40 commit 0aff5bf
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/net_processing.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2511,6 +2511,8 @@ void PeerManagerImpl::ProcessGetBlockData(CNode& pfrom, Peer& peer, const CInv&
std::shared_ptr<const CBlock> pblock;
if (a_recent_block && a_recent_block->GetHash() == pindex->GetBlockHash()) {
pblock = a_recent_block;
/*
// Blackcoin: do not read raw blocks from disk as the disk format is actually different
} else if (inv.IsMsgWitnessBlk()) {
// Fast-path: in this case it is possible to serve the block directly from disk,
// as the network format matches the format on disk
Expand All @@ -2520,6 +2522,7 @@ void PeerManagerImpl::ProcessGetBlockData(CNode& pfrom, Peer& peer, const CInv&
}
m_connman.PushMessage(&pfrom, msgMaker.Make(NetMsgType::BLOCK, Span{block_data}));
// Don't set pblock as we've sent the block
*/
} else {
// Send block from disk
std::shared_ptr<CBlock> pblockRead = std::make_shared<CBlock>();
Expand Down

0 comments on commit 0aff5bf

Please sign in to comment.