aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorDan Engelbrecht <[email protected]>2025-09-26 11:18:30 +0200
committerGitHub Enterprise <[email protected]>2025-09-26 11:18:30 +0200
commit840258c8ea91f0f7c483aa544407eb93328bda81 (patch)
tree52fd11af6558bc88e38494ce7d1a56132921ad38 /src
parentnew append op rpc method (#511) (diff)
downloadzen-840258c8ea91f0f7c483aa544407eb93328bda81.tar.xz
zen-840258c8ea91f0f7c483aa544407eb93328bda81.zip
list missing block hashes when --verbose is enabled (#512)
Diffstat (limited to 'src')
-rw-r--r--src/zen/cmds/builds_cmd.cpp14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/zen/cmds/builds_cmd.cpp b/src/zen/cmds/builds_cmd.cpp
index fee2adaee..4ad5d2b15 100644
--- a/src/zen/cmds/builds_cmd.cpp
+++ b/src/zen/cmds/builds_cmd.cpp
@@ -9051,6 +9051,20 @@ namespace {
std::string ErrorDescription =
fmt::format("All required blocks could not be found, {} blocks does not have metadata in this context.",
BlockRawHashes.size() - OutBlockDescriptions.size());
+ if (IsVerbose)
+ {
+ for (const IoHash& BlockHash : BlockRawHashes)
+ {
+ if (auto It = std::find_if(
+ OutBlockDescriptions.begin(),
+ OutBlockDescriptions.end(),
+ [BlockHash](const ChunkBlockDescription& Description) { return Description.BlockHash == BlockHash; });
+ It == OutBlockDescriptions.end())
+ {
+ ErrorDescription += fmt::format("\n {}", BlockHash);
+ }
+ }
+ }
if (AttemptFallback)
{
ZEN_CONSOLE_WARN("{} Attemping fallback options.", ErrorDescription);