Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

infra, db: fix Clang Tidy and Win build after PR 1911 #1919

Merged
merged 1 commit into from
Mar 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions silkworm/db/snapshots/index.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -280,10 +280,10 @@ void TransactionIndex::build() {
SILK_TRACE << "TransactionIndex::build path: " << segment_path_.path().string() << " end";
}

bool TransactionIndex::walk(RecSplit8& rec_split, uint64_t i, uint64_t offset, ByteView tx_buffer) {
bool TransactionIndex::walk(RecSplit8& rec_split, uint64_t i, uint64_t offset, ByteView word) {
Hash tx_hash;
try {
tx_hash = tx_buffer_hash(tx_buffer, base_data_id_ + i);
tx_hash = tx_buffer_hash(word, base_data_id_ + i);
} catch (const std::runtime_error& ex) {
std::stringstream error;
error << "TransactionIndex::build cannot build index for: " << segment_path_.path()
Expand Down
4 changes: 2 additions & 2 deletions silkworm/infra/common/memory_mapped_file.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -118,8 +118,8 @@ void* MemoryMappedFile::mmap(FileDescriptor fd, size_t size, bool read_only) {
}

void MemoryMappedFile::unmap() {
if (address_ != nullptr) {
::UnmapViewOfFile(address_);
if (region_.data() != nullptr) {
::UnmapViewOfFile(region_.data());
}
}

Expand Down
2 changes: 1 addition & 1 deletion silkworm/infra/common/memory_mapped_file.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ class MemoryMappedFile {
//! The path to the file
std::filesystem::path path_;

//! The address of the mapped area
//! The area mapped in memory
MemoryMappedRegion region_;

//! Flag indicating if memory-mapping is managed internally or not
Expand Down
Loading