upleb.uk

Public git repos — served from a NIP-34 GRASP relay at git.upleb.uk

summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbitflash-maintainer <noreply@bitflash.invalid>2026-08-08 05:01:35 +0000
committerbitflash-maintainer <noreply@bitflash.invalid>2026-08-23 04:37:36 +0000
commitbef4f5b3a5a6f5a663b7ea7753dd57e368fd8929 (patch)
treec036d69fd0892e9bd1090b444531fe79a785318a
parent76f154a4c600082b346124e9e9af26ce401600da (diff)
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)
-rw-r--r--src/rpc.cpp6
1 files changed, 3 insertions, 3 deletions
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*)
442 if (SendMoney(sc, kv.second, wtx)) { 442 if (SendMoney(sc, kv.second, wtx)) {
443 LogPrint("payout", "[payout] paid %s to %s\n", 443 LogPrint("payout", "[payout] paid %s to %s\n",
444 FormatMoney(kv.second).c_str(), kv.first.c_str()); 444 FormatMoney(kv.second).c_str(), kv.first.c_str());
445 } else if (pp.retries < 30) { 445 } else if (pp.retries < 1440) {
446 // Transient failures (immature coinbase, reorg, locked 446 // Transient failures (immature coinbase, reorg, locked
447 // wallet) must not silently burn the payment -- requeue 447 // wallet) must not silently burn the payment -- requeue
448 // with backoff. Permanent cases (orphaned coinbase) give 448 // with backoff. Permanent cases (orphaned coinbase) give
449 // up loudly after 30 tries (~30 min). 449 // up loudly after 1440 tries (~24 h).
450 PendingPayout rp; 450 PendingPayout rp;
451 rp.matureAtHeight = pp.matureAtHeight; 451 rp.matureAtHeight = pp.matureAtHeight;
452 rp.amounts[kv.first] = kv.second; 452 rp.amounts[kv.first] = kv.second;
@@ -457,7 +457,7 @@ static void PayoutThreadFn(void*)
457 gPayoutExecQueue.push_back(std::move(rp)); 457 gPayoutExecQueue.push_back(std::move(rp));
458 } 458 }
459 LogPrint("payout", "[payout] FAILED to pay %s to %s" 459 LogPrint("payout", "[payout] FAILED to pay %s to %s"
460 " -- retry %d/30 in 60s\n", 460 " -- retry %d/1440 in 60s\n",
461 FormatMoney(kv.second).c_str(), kv.first.c_str(), 461 FormatMoney(kv.second).c_str(), kv.first.c_str(),
462 pp.retries + 1); 462 pp.retries + 1);
463 } else { 463 } else {