diff options
| author | bitflash-maintainer <noreply@bitflash.invalid> | 2026-09-02 09:03:01 +0000 |
|---|---|---|
| committer | bitflash-maintainer <noreply@bitflash.invalid> | 2026-09-02 09:03:01 +0000 |
| commit | 7c70eb4498e88725241493033edfe89554ff1b18 (patch) | |
| tree | a053678bf029d17c3a0b193fbaaf1abaf3778aff /src/main.cpp | |
| parent | e4f898c4a6b9900553c64b9804889b5fdae3e55f (diff) | |
tunnel: report which stage failed instead of guessing the cause
Diffstat (limited to 'src/main.cpp')
| -rw-r--r-- | src/main.cpp | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/main.cpp b/src/main.cpp index 7b3e555..c0a8825 100644 --- a/src/main.cpp +++ b/src/main.cpp | |||
| @@ -3758,13 +3758,14 @@ static bool PoolParticipantMiner() | |||
| 3758 | // Step 2b: open encrypted tunnel to pool | 3758 | // Step 2b: open encrypted tunnel to pool |
| 3759 | // ------------------------------------------------------------------ | 3759 | // ------------------------------------------------------------------ |
| 3760 | SetParticipantMiningStatus("opening tunnel"); | 3760 | SetParticipantMiningStatus("opening tunnel"); |
| 3761 | btf::TunnelFail tunnelFail = btf::TUNNEL_FAIL_NONE; | ||
| 3761 | s = btf::BtfClientTunnel(host.c_str(), (unsigned short)port, | 3762 | s = btf::BtfClientTunnel(host.c_str(), (unsigned short)port, |
| 3762 | target_pubkey, service_enc_pub); | 3763 | target_pubkey, service_enc_pub, &tunnelFail); |
| 3763 | if (s == INVALID_SOCKET) { | 3764 | if (s == INVALID_SOCKET) { |
| 3764 | LogPrint("worker", "[worker] tunnel connect FAILED via %s" | 3765 | LogPrint("worker", "[worker] tunnel connect FAILED via %s: %s\n", |
| 3765 | " (relay unreachable or pool not listening)\n", | 3766 | meetingHostPort.c_str(), btf::TunnelFailText(tunnelFail)); |
| 3766 | meetingHostPort.c_str()); | 3767 | SetParticipantMiningStatus(std::string("tunnel connect failed: ") |
| 3767 | SetParticipantMiningStatus("tunnel connect failed"); | 3768 | + btf::TunnelFailText(tunnelFail)); |
| 3768 | return false; | 3769 | return false; |
| 3769 | } | 3770 | } |
| 3770 | LogPrint("worker", "[worker] tunnel open via %s\n", meetingHostPort.c_str()); | 3771 | LogPrint("worker", "[worker] tunnel open via %s\n", meetingHostPort.c_str()); |