mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-04-26 23:09:03 +02:00
Use DataStream where possible
This commit is contained in:
@@ -27,7 +27,7 @@ static void LoadExternalBlockFile(benchmark::Bench& bench)
|
||||
// Create a single block as in the blocks files (magic bytes, block size,
|
||||
// block data) as a stream object.
|
||||
const fs::path blkfile{testing_setup.get()->m_path_root / "blk.dat"};
|
||||
CDataStream ss(SER_DISK, 0);
|
||||
DataStream ss{};
|
||||
auto params{testing_setup->m_node.chainman->GetParams()};
|
||||
ss << params.MessageStart();
|
||||
ss << static_cast<uint32_t>(benchmark::data::block413567.size());
|
||||
|
||||
@@ -61,7 +61,7 @@ static void PrevectorResize(benchmark::Bench& bench)
|
||||
template <typename T>
|
||||
static void PrevectorDeserialize(benchmark::Bench& bench)
|
||||
{
|
||||
CDataStream s0(SER_NETWORK, 0);
|
||||
DataStream s0{};
|
||||
prevector<28, T> t0;
|
||||
t0.resize(28);
|
||||
for (auto x = 0; x < 900; ++x) {
|
||||
|
||||
Reference in New Issue
Block a user