Added an error code to some error messages

This commit is contained in:
SChernykh
2024-10-14 12:23:12 +02:00
parent 1053e22a52
commit 510a271434
2 changed files with 4 additions and 1 deletions

View File

@@ -438,7 +438,7 @@ void P2PServer::save_peer_list()
std::ofstream f(saved_peer_list_file_name, std::ios::binary); std::ofstream f(saved_peer_list_file_name, std::ios::binary);
if (!f.is_open()) { if (!f.is_open()) {
LOGERR(1, "failed to save peer list"); LOGERR(1, "failed to save peer list " << saved_peer_list_file_name << ", error " << errno);
return; return;
} }

View File

@@ -1695,6 +1695,9 @@ void p2pool::api_update_block_found(const ChainMain* data, const PoolBlock* bloc
f.flush(); f.flush();
f.close(); f.close();
} }
else {
LOGERR(1, "Failed to update " << FOUND_BLOCKS_FILE << ", error " << errno);
}
} }
std::vector<FoundBlock> found_blocks; std::vector<FoundBlock> found_blocks;