From 510a271434b559c79de7d6839362c131380c3b7e Mon Sep 17 00:00:00 2001 From: SChernykh <15806605+SChernykh@users.noreply.github.com> Date: Mon, 14 Oct 2024 12:23:12 +0200 Subject: [PATCH] Added an error code to some error messages --- src/p2p_server.cpp | 2 +- src/p2pool.cpp | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/p2p_server.cpp b/src/p2p_server.cpp index f4aeba2..1b7513c 100644 --- a/src/p2p_server.cpp +++ b/src/p2p_server.cpp @@ -438,7 +438,7 @@ void P2PServer::save_peer_list() std::ofstream f(saved_peer_list_file_name, std::ios::binary); 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; } diff --git a/src/p2pool.cpp b/src/p2pool.cpp index d5b60f0..4245008 100644 --- a/src/p2pool.cpp +++ b/src/p2pool.cpp @@ -1695,6 +1695,9 @@ void p2pool::api_update_block_found(const ChainMain* data, const PoolBlock* bloc f.flush(); f.close(); } + else { + LOGERR(1, "Failed to update " << FOUND_BLOCKS_FILE << ", error " << errno); + } } std::vector found_blocks;