tips: grin config gate, reorg sweep_txid preservation, LWS import retry

- config: grin is a supported tip chain (voucher model verified against the node),
  so FEATURE_TIPS with only grin enabled no longer fails closed at boot.
- social_tips: revert_sweep_on_reorg now preserves sweep_txid instead of nulling
  it. Address-scan chains (btc/ltc/xmr/wow) overwrite it via confirm_sweep_onchain
  on the next cycle, so preserving the orphaned value is harmless; grin needs the
  kernel excess to re-date a re-mined sweep via get_kernel, so nulling it stranded
  reorged grin tips in 'claiming'. Test updated to assert preservation.
- lws import_account: retry the birthday backfill rescan (3 attempts, backoff) so
  a transient failure no longer strands a new account at the chain tip. The
  already-registered Some(_) no-op is unchanged, so this cannot reintroduce the
  balance-reset bug.
This commit is contained in:
jwinterm
2026-07-11 12:21:03 -04:00
parent 533f945290
commit c5c8dd5bf1
4 changed files with 49 additions and 17 deletions
+5 -5
View File
@@ -1105,14 +1105,14 @@ impl Config {
// Public tips escrow on-chain and deliver by share URL, so an instance
// with FEATURE_TIPS on but no chain to escrow on, or no TIP_SHARE_BASE_URL
// to build share links from, would advertise a tips subsystem it cannot
// actually serve. Fail closed rather than boot broken. (Grin is out of the
// tips port, so it is NOT a supported tip chain here.)
// actually serve. Fail closed rather than boot broken. Grin tips (voucher
// model, verified against the grin node) are supported, so grin counts.
if self.features.tips {
let c = &self.features.chains;
if !(c.btc || c.ltc || c.xmr || c.wow) {
if !(c.btc || c.ltc || c.xmr || c.wow || c.grin) {
return Err(cfg_err(
"FEATURE_TIPS is on but no supported tip chain is enabled — enable at least \
one of FEATURE_BTC / FEATURE_LTC / FEATURE_XMR / FEATURE_WOW",
"FEATURE_TIPS is on but no supported tip chain is enabled: enable at least \
one of FEATURE_BTC / FEATURE_LTC / FEATURE_XMR / FEATURE_WOW / FEATURE_GRIN",
));
}
if self.tip_share_base.is_none() {