Skip to content

Commit

Permalink
Merge pull request #29 from AntelopeIO/gh_1875
Browse files Browse the repository at this point in the history
Fix issue with incorrect `database_size` when requesting a smaller `shared_file_size`
  • Loading branch information
greg7mdp authored Nov 8, 2023
2 parents 7615dda + 1e0d680 commit 91a7398
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/pinnable_mapped_file.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,8 @@ pinnable_mapped_file::pinnable_mapped_file(const std::filesystem::path& dir, boo
std::filesystem::resize_file(_data_file_path, shared_file_size);
}
else if(shared_file_size < existing_file_size) {
std::cerr << "CHAINBASE: \"" << _database_name << "\" requested size of " << shared_file_size << " is less than "
_database_size = existing_file_size;
std::cerr << "CHAINBASE: \"" << _database_name << "\" requested size of " << shared_file_size << " is less than "
"existing size of " << existing_file_size << ". This database will not be shrunk and will "
"remain at " << existing_file_size << '\n';
}
Expand Down

0 comments on commit 91a7398

Please sign in to comment.