chore: use std::vector<std::byte> for BlockManager::ReadRawBlock()

This commit is contained in:
Roman Zeyde
2025-06-07 21:05:48 +03:00
parent 19765dca19
commit 6ecb9fc65f
12 changed files with 20 additions and 19 deletions

View File

@@ -2303,7 +2303,7 @@ void PeerManagerImpl::ProcessGetBlockData(CNode& pfrom, Peer& peer, const CInv&
} 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
std::vector<uint8_t> block_data;
std::vector<std::byte> block_data;
if (!m_chainman.m_blockman.ReadRawBlock(block_data, block_pos)) {
if (WITH_LOCK(m_chainman.GetMutex(), return m_chainman.m_blockman.IsBlockPruned(*pindex))) {
LogDebug(BCLog::NET, "Block was pruned before it could be read, %s\n", pfrom.DisconnectMsg(fLogIPs));