diff options
| author | Adam Soltys <[email protected]> | 2026-08-27 11:19:07 -0700 |
|---|---|---|
| committer | Adam Soltys <[email protected]> | 2026-08-27 11:19:07 -0700 |
| commit | 340cb3704620ec4bf7ebafcd1ac1a1343251c14b (patch) | |
| tree | a4c2ad3bf93acee512e719deba53a976465008db /src/features | |
| parent | b11e3b50483ae254caccebe220275863eb762a47 (diff) | |
| download | coinosv3-340cb3704620ec4bf7ebafcd1ac1a1343251c14b.tar.gz coinosv3-340cb3704620ec4bf7ebafcd1ac1a1343251c14b.zip | |
Renewal stops billing for tidiness: six refund coins after a failed payment no longer trigger a top-bracket consolidation (multi-input sends made fragmentation cheap to live with — the trigger moves to the 24-input ceiling), and the history line for a refresh now names the fee it paid
Co-Authored-By: Claude Fable 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_019eA8JRq9Wr7z2fRQk99HLi
Diffstat (limited to 'src/features')
| -rw-r--r-- | src/features/ark.js | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/features/ark.js b/src/features/ark.js index 9aa43c2..59bdb10 100644 --- a/src/features/ark.js +++ b/src/features/ark.js @@ -1855,7 +1855,12 @@ export function arkFeature(ctx) { const tip = await mgr.chain.tipHeight(); const RENEW_BLOCKS = getNetwork() === 'regtest' ? 24 : 1008; // ~1 week of margin on mainnet const expiring = spendables.some((v) => v.expiryHeight && v.expiryHeight - tip < RENEW_BLOCKS); - const fragmented = spendables.length >= 6; + // Fragmentation alone is no longer worth paying for: multi-input sends + // handle up to 24 coins, and consolidating FRESH coins bills the round + // fee's top ppm bracket (a burst of refund coins after failed payments + // once cost a user ~1% overnight). Consolidate only when the coin count + // itself approaches the 24-input send ceiling. + const fragmented = spendables.length >= 20; const totalSat = spendables.reduce((n, v) => n + v.amountSat, 0); const renewable = totalSat - mgr.refreshFee(spendables, tip) >= 330; if (expiring && !renewable) { |
