Skip to content

Comments

feat(settings): LDK peer simulation debug UI#458

Open
ovitrif wants to merge 2 commits intorelease-hotfix-v2.0.5from
fix/peer-simulation-dev-settings
Open

feat(settings): LDK peer simulation debug UI#458
ovitrif wants to merge 2 commits intorelease-hotfix-v2.0.5from
fix/peer-simulation-dev-settings

Conversation

@ovitrif
Copy link
Collaborator

@ovitrif ovitrif commented Feb 22, 2026

Summary

  • Add Peer Simulation segmented picker to LDK Debug screen for testing Blocktank peer connection edge cases
  • Add BlocktankPeerSimulation enum to WalletViewModel with simulation modes: None, API Failure, Unreachable Peers

Stacked on #456.

Changes

File Change
WalletViewModel.swift Add BlocktankPeerSimulation enum, static var, and simulation switch in fetchTrustedPeersFromBlocktank()
LdkDebugScreen.swift Add "Peer Simulation" segmented picker in the LDK Debug screen (after "Node" section)

Test plan

  • Build & run (Cmd+R)
  • Navigate: Settings → Dev Settings → LDK Debug
  • Verify "Peer Simulation" segmented picker is visible below "Node" section
  • Select "API Failure", tap Restart — confirm fallback to env peers
  • Select "Unreachable Peers", tap Restart — confirm verification fallback logic

@ovitrif ovitrif changed the title fix(settings): peer simulation picker & scheme build config fix(settings): LDK peer simulation picker Feb 22, 2026
Add BlocktankPeerSimulation enum to WalletViewModel with simulation
modes (None, API Failure, Unreachable Peers) and a segmented picker
in the LDK Debug screen for testing Blocktank peer connection edge
cases. Dev Settings is already UI-gated via @AppStorage, so no
compile-time guards are needed.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@ovitrif ovitrif force-pushed the fix/peer-simulation-dev-settings branch from 23dc3d4 to 9d7947e Compare February 22, 2026 22:08
Extract reconnectTrustedPeers() from WalletViewModel.start() and call it
after lightningService.restart() in LdkDebugScreen so the peer simulation
picker actually takes effect on restart.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@ovitrif ovitrif changed the title fix(settings): LDK peer simulation picker feat(settings): LDK peer simulation debug Feb 22, 2026
@ovitrif ovitrif changed the title feat(settings): LDK peer simulation debug feat(settings): LDK peer simulation debug UI Feb 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants