diff options
| author | bitflash-maintainer <noreply@bitflash.invalid> | 2026-08-08 05:01:35 +0000 |
|---|---|---|
| committer | bitflash-maintainer <noreply@bitflash.invalid> | 2026-08-19 22:48:26 +0000 |
| commit | f5d44dfc23745b13f0c7f216bc4cdcb1f8cc30d0 (patch) | |
| tree | 4483f9e3c6553128c58fe6ad11db4c008aa6720d | |
| parent | faeb40c5d1dbcb6548c9825b14fa3b72f6497d86 (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.cpp | 6 |
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 { |