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

Provide error code with directory create failure. #704

Merged
merged 2 commits into from
Jan 3, 2025
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 console/executor_store.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -59,9 +59,9 @@ bool executor::check_store_path(bool create) const
if (create)
{
logger(format(BN_INITIALIZING_CHAIN) % store);
if (!database::file::create_directory(store))
if (auto ec = database::file::create_directory_ex(store))
{
logger(format(BN_INITCHAIN_EXISTS) % store);
logger(format(BN_INITCHAIN_DIRECTORY_ERROR) % store % ec.message());
return false;
}
}
Expand Down
4 changes: 2 additions & 2 deletions console/localize.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@ namespace node {
// --initchain
#define BN_INITIALIZING_CHAIN \
"Initializing %1% directory..."
#define BN_INITCHAIN_EXISTS \
"Failed because the directory %1% already exists."
#define BN_INITCHAIN_DIRECTORY_ERROR \
"Failed creating directory %1% with error '%2%'."
#define BN_INITCHAIN_CREATING \
"Please wait while creating the database..."
#define BN_INITCHAIN_CREATED \
Expand Down
4 changes: 4 additions & 0 deletions src/chasers/chaser_validate.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -347,10 +347,14 @@ bool chaser_validate::update_neutrino(const header_link& link,
if (!query.neutrino_enabled())
return true;

// Filters are computed during validate, in parallel.
// Validation skipped under checkpoint/milestone to only compute filter.
data_chunk filter{};
if (!compute_filter(filter, block))
return false;

// TODO: move filter header computation to confirmation chaser (ordered).
// TODO: this requires distinct storage array[n, 256] for filter headers.
neutrino_ = compute_filter_header(neutrino_, filter);
return query.set_filter(link, neutrino_, filter);
}
Expand Down
Loading