Merge 4f802e59a0 into merged_master (Bitcoin PR #17509)

This commit is contained in:
Andrew Poelstra 2020-11-26 01:08:28 +00:00
commit 1ea940a2e2
13 changed files with 223 additions and 53 deletions

View file

@ -147,6 +147,12 @@ bool CheckDiskSpace(const fs::path& dir, uint64_t additional_bytes)
return free_bytes_available >= min_disk_space + additional_bytes;
}
std::streampos GetFileSize(const char* path, std::streamsize max) {
std::ifstream file(path, std::ios::binary);
file.ignore(max);
return file.gcount();
}
/**
* Interpret a string argument as a boolean.
*