Fingerprint .core

This commit is contained in:
Pepijn Schoen
2017-04-07 18:43:43 +02:00
committed by Patrick Niklaus
parent 85ec50552d
commit 802af08179
3 changed files with 10 additions and 9 deletions
+2 -2
View File
@@ -123,10 +123,10 @@ void Contractor::WriteCoreNodeMarker(std::vector<bool> &&in_is_core_node) const
}
storage::io::FileWriter core_marker_output_file(config.core_output_path,
storage::io::FileWriter::HasNoFingerprint);
storage::io::FileWriter::GenerateFingerprint);
const std::size_t count = unpacked_bool_flags.size();
core_marker_output_file.WriteElementCount32(count);
core_marker_output_file.WriteElementCount64(count);
core_marker_output_file.WriteFrom(unpacked_bool_flags.data(), count);
}
+4 -4
View File
@@ -292,8 +292,8 @@ void Storage::PopulateLayout(DataLayout &layout)
// load core marker size
if (boost::filesystem::exists(config.core_data_path))
{
io::FileReader core_marker_file(config.core_data_path, io::FileReader::HasNoFingerprint);
const auto number_of_core_markers = core_marker_file.ReadElementCount32();
io::FileReader core_marker_file(config.core_data_path, io::FileReader::VerifyFingerprint);
const auto number_of_core_markers = core_marker_file.ReadElementCount64();
layout.SetBlockSize<unsigned>(DataLayout::CH_CORE_MARKER, number_of_core_markers);
}
else
@@ -743,8 +743,8 @@ void Storage::PopulateData(const DataLayout &layout, char *memory_ptr)
if (boost::filesystem::exists(config.core_data_path))
{
io::FileReader core_marker_file(config.core_data_path, io::FileReader::HasNoFingerprint);
const auto number_of_core_markers = core_marker_file.ReadElementCount32();
io::FileReader core_marker_file(config.core_data_path, io::FileReader::VerifyFingerprint);
const auto number_of_core_markers = core_marker_file.ReadElementCount64();
// load core markers
std::vector<char> unpacked_core_markers(number_of_core_markers);