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

@@ -660,9 +660,9 @@ static CBlock GetBlockChecked(BlockManager& blockman, const CBlockIndex& blockin
return block;
}
static std::vector<uint8_t> GetRawBlockChecked(BlockManager& blockman, const CBlockIndex& blockindex)
static std::vector<std::byte> GetRawBlockChecked(BlockManager& blockman, const CBlockIndex& blockindex)
{
std::vector<uint8_t> data{};
std::vector<std::byte> data{};
FlatFilePos pos{};
{
LOCK(cs_main);
@@ -812,7 +812,7 @@ static RPCHelpMan getblock()
}
}
const std::vector<uint8_t> block_data{GetRawBlockChecked(chainman.m_blockman, *pblockindex)};
const std::vector<std::byte> block_data{GetRawBlockChecked(chainman.m_blockman, *pblockindex)};
if (verbosity <= 0) {
return HexStr(block_data);