aboutsummaryrefslogtreecommitdiff
path: root/src/blockchain_utilities
diff options
context:
space:
mode:
Diffstat (limited to 'src/blockchain_utilities')
-rw-r--r--src/blockchain_utilities/blockchain_blackball.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/blockchain_utilities/blockchain_blackball.cpp b/src/blockchain_utilities/blockchain_blackball.cpp
index d9a179f64..c80dd5862 100644
--- a/src/blockchain_utilities/blockchain_blackball.cpp
+++ b/src/blockchain_utilities/blockchain_blackball.cpp
@@ -898,7 +898,11 @@ static std::vector<std::pair<uint64_t, uint64_t>> load_outputs(const std::string
while (1)
{
char s[256];
- fgets(s, sizeof(s), f);
+ if (!fgets(s, sizeof(s), f))
+ {
+ MERROR("Error reading from " << filename << ": " << strerror(errno));
+ break;
+ }
if (feof(f))
break;
const size_t len = strlen(s);