51 if (!fs::exists(chaindir)) {
52 LogWarning(
"[snapshot] cannot read base blockhash: no chainstate dir "
53 "exists at path %s", fs::PathToString(chaindir));
57 const std::string read_from_str = fs::PathToString(read_from);
59 if (!fs::exists(read_from)) {
60 LogWarning(
"[snapshot] snapshot chainstate dir is malformed! no base blockhash file "
61 "exists at path %s. Try deleting %s and calling loadtxoutset again?",
62 fs::PathToString(chaindir), read_from_str);
70 LogWarning(
"[snapshot] failed to open base blockhash file for reading: %s",
74 afile >> base_blockhash;
76 int64_t position = afile.
tell();
77 afile.
seek(0, SEEK_END);
78 if (position != afile.
tell()) {
79 LogWarning(
"[snapshot] unexpected trailing data in %s", read_from_str);
81 return base_blockhash;
RecursiveMutex cs_main
Mutex to guard access to validation specific variables, such as reading or changing the chainstate.