mirror of
https://github.com/Such-Software/smirk-backend-core.git
synced 2026-11-12 19:23:55 +01:00
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:
+5
-5
@@ -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() {
|
||||
|
||||
Reference in New Issue
Block a user