mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-06-03 17:54:19 +02:00
Merge bitcoin/bitcoin#28904: Drop CAutoFile
4eb2a9ea4bstreams: Drop unused CAutoFile (Anthony Towns)cde9a4b137refactor: switch from CAutoFile to AutoFile (Anthony Towns)bbd4646a2eblockstorage: switch from CAutoFile to AutoFile (Anthony Towns)c72ddf04dbstreams: Remove unused CAutoFile::GetVersion (Anthony Towns)e63f643079streams: Base BufferedFile on AutoFile instead of CAutoFile (Anthony Towns) Pull request description: Continuing the move away from `GetVersion()`, replace uses of `CAutoFile` with `AutoFile`. ACKs for top commit: maflcko: re-ACK4eb2a9ea4b🖼 TheCharlatan: ACK4eb2a9ea4bstickies-v: ACK4eb2a9ea4bTree-SHA512: 1a68c42fdb725ca4bf573e22794fe7809fea764a5f97ecb33435add3c609d40f336038fb22ab1ea72567530efd39678278c9016f92ed04891afdb310631b4e82
This commit is contained in:
@@ -55,7 +55,7 @@ static void LoadExternalBlockFile(benchmark::Bench& bench)
|
||||
bench.run([&] {
|
||||
// "rb" is "binary, O_RDONLY", positioned to the start of the file.
|
||||
// The file will be closed by LoadExternalBlockFile().
|
||||
CAutoFile file{fsbridge::fopen(blkfile, "rb"), CLIENT_VERSION};
|
||||
AutoFile file{fsbridge::fopen(blkfile, "rb")};
|
||||
testing_setup->m_node.chainman->LoadExternalBlockFile(file, &pos, &blocks_with_unknown_parent);
|
||||
});
|
||||
fs::remove(blkfile);
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
static void FindByte(benchmark::Bench& bench)
|
||||
{
|
||||
// Setup
|
||||
CAutoFile file{fsbridge::fopen("streams_tmp", "w+b"), 0};
|
||||
AutoFile file{fsbridge::fopen("streams_tmp", "w+b")};
|
||||
const size_t file_size = 200;
|
||||
uint8_t data[file_size] = {0};
|
||||
data[file_size-1] = 1;
|
||||
|
||||
Reference in New Issue
Block a user