mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-12 06:58:57 +01:00
Use spans of std::byte in serialize
This switches .read() and .write() to take spans of bytes.
This commit is contained in:
@@ -435,7 +435,7 @@ bool ReadRawBlockFromDisk(std::vector<uint8_t>& block, const FlatFilePos& pos, c
|
||||
}
|
||||
|
||||
block.resize(blk_size); // Zeroing of memory is intentional here
|
||||
filein.read((char*)block.data(), blk_size);
|
||||
filein.read(MakeWritableByteSpan(block));
|
||||
} catch (const std::exception& e) {
|
||||
return error("%s: Read from block file failed: %s for %s", __func__, e.what(), pos.ToString());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user