From bef4f5b3a5a6f5a663b7ea7753dd57e368fd8929 Mon Sep 17 00:00:00 2001 From: bitflash-maintainer Date: Sat, 8 Aug 2026 05:01:35 +0000 Subject: payout: retry failed SendMoney for 24h, not 30min A pool that just found its first blocks has zero mature balance until 100 blocks later; orphaned coinbases (observed: reorgs orphaned our blocks 2651-2655) make that worse. 30 one-minute retries forfeited payments that would have succeeded hours later. (cherry picked from commit 49e80023ca23baee8a4b80cfb891e7a358dc39ba) --- src/rpc.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/rpc.cpp b/src/rpc.cpp index 98b6208..3dd05bb 100644 --- a/src/rpc.cpp +++ b/src/rpc.cpp @@ -442,11 +442,11 @@ static void PayoutThreadFn(void*) if (SendMoney(sc, kv.second, wtx)) { LogPrint("payout", "[payout] paid %s to %s\n", FormatMoney(kv.second).c_str(), kv.first.c_str()); - } else if (pp.retries < 30) { + } else if (pp.retries < 1440) { // Transient failures (immature coinbase, reorg, locked // wallet) must not silently burn the payment -- requeue // with backoff. Permanent cases (orphaned coinbase) give - // up loudly after 30 tries (~30 min). + // up loudly after 1440 tries (~24 h). PendingPayout rp; rp.matureAtHeight = pp.matureAtHeight; rp.amounts[kv.first] = kv.second; @@ -457,7 +457,7 @@ static void PayoutThreadFn(void*) gPayoutExecQueue.push_back(std::move(rp)); } LogPrint("payout", "[payout] FAILED to pay %s to %s" - " -- retry %d/30 in 60s\n", + " -- retry %d/1440 in 60s\n", FormatMoney(kv.second).c_str(), kv.first.c_str(), pp.retries + 1); } else { -- cgit v1.2.3