Skip to content

Commit

Permalink
Merge pull request #704 from evoskuil/master
Browse files Browse the repository at this point in the history
Provide error code with directory create failure.
  • Loading branch information
evoskuil authored Jan 3, 2025
2 parents 075943b + 3fe83b9 commit 7760e86
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
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

0 comments on commit 7760e86

Please sign in to comment.