diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/ark/manager.js | 2 | ||||
| -rw-r--r-- | src/features/ark.js | 7 |
2 files changed, 7 insertions, 2 deletions
diff --git a/src/ark/manager.js b/src/ark/manager.js index eef2ec9..1129c38 100644 --- a/src/ark/manager.js +++ b/src/ark/manager.js @@ -1627,7 +1627,7 @@ export class ArkManager { } for (const v of inputRecs) v.state = 'spent'; action.step = 'done'; - this._movement({ type: 'refresh', amountSat: action.outAmountSat, status: 'complete', detail: `${inputRecs.length} in -> ${newVtxos.length} out` }); + this._movement({ type: 'refresh', amountSat: action.outAmountSat, status: 'complete', detail: `${inputRecs.length} in -> ${newVtxos.length} out${action.feeSat ? ` · fee ${action.feeSat} sat` : ''}` }); this._save(); } } 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) { |
