Skip to content

Add node status, peers, and filter sync progress to the CBF node screen - #66

Open
skypank-coder wants to merge 1 commit into
bitcoindevkit:masterfrom
skypank-coder:node-screen-data
Open

skypank-coder wants to merge 1 commit into
bitcoindevkit:masterfrom
skypank-coder:node-screen-data

Conversation

@skypank-coder

Copy link
Copy Markdown
Contributor

Closes #50.

The CBF node screen only exposed a binary Online/Offline status and the latest known block. This surfaces the live node data the Kyoto client already tracks.

What's shown now

  • Node status distinguishes Connecting, Syncing, and Online, instead of just Online/Offline.
  • Chain tip — the wallet's best block height.
  • Connected peers — a live count plus each peer's address, from the client's peer_info().
  • Filter sync progress — a percentage and progress bar, from the node's Progress events.

All of the node fields reset when the node stops.

Implementation notes

  • WalletScreenState gains connectedPeers and filtersProgress; Kyoto gets a peerInfo() passthrough.
  • The ViewModel now owns a single consumer of the info and warning streams, replacing Kyoto.logToLogcat(). It both logs to Logcat and updates the UI state. This has to stay a single consumer: infoLog()/warningLog() each drive their own next_info()/next_warning() loop, so a second collector running alongside logToLogcat() would have split the event stream between them.
  • The peer list is re-read on connection events (ConnectionsMet/SuccessfulHandshake) and on warnings, since those are the events that actually change it — not on every progress tick.

@skypank-coder

Copy link
Copy Markdown
Contributor Author

@thunderbiscuit Please review this .

This branch has not been deployed

No deployments
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.

Add node data on node screen

1 participant