Repository navigation
Remove unused code; one way to build the node connection - #72
Merged
Merged
Conversation
No change in behaviour, except that two unused options are gone. - Node layer (S2): RESTClient.headers and its helpers, Node.utxo_set_info, Node.last_latency, getblockcount on the whitelist; the mock node no longer serves them. - Store (S3): store.now, Store.lock, Store._seq, spam_utxo_count, size_on_disk and the readonly branch (the web server has its own read-only connections). - Settings (S4): Setting.file_ok, .group and .choices, json_schema with --print-settings-schema, UPSTREAM_DATE, the PROFILES labels, the fields of /api/settings the page does not use, and allow_pause_when_managed (pause is always available; an old value in settings.json is ignored). - S5: a test for the built-in HTTPS server (certificate made with openssl). - S9: node.client.make_node(config, timeout) replaces Scanner.make_node, the second copy in maybe_utxo_info and the Scanner built only to make a node in the connection test and the lookup. - S10: BlockNotConnected (a BlockInvalid) replaces matching "parent" in the error text. - S11: Scanner.node_busy() replaces the two copies of the latency rule. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Part of the 0.3.13 release (review simplifications S2–S5, S9–S11). No change in behaviour, except that two unused options are gone. Net −64 lines.
Every item was checked for uses in the app, the tests, the docs and both package repositories before it was removed.
Deleted
RESTClient.headerswith_split_headers,MAX_HEADERS,new_headers_syntax;Node.utxo_set_info;Node.last_latency(written, never read);getblockcounton the RPC whitelist (the app never called it). The mock node no longer serves REST headers orgetblockcount.tests/umbrel_feed.pystill callsgetblockcount: that is CI tooling with its own RPC helper against the regtest node, not the app's client.store.now,Store.lock,Store._seq,Store.spam_utxo_count(tests now queryutxo_histdirectly),Store.size_on_disk, and thereadonlybranch ofStore(the web server opens its own read-only connections inanalytics.py).Setting.file_ok(always true),.group, and.choices(unused once the API fields went);json_schema()with--print-settings-schema(nothing read the schema; the StartOS package has its own model);UPSTREAM_DATE; thelabelentries inPROFILES; the fields of/api/settingsthe page does not use (default,help,choices,group,secret); the settingallow_pause_when_managed. Pause is always available now, as before by default; an old value insettings.jsonis ignored like any unknown key.docs/settings.mdanddocs/startos.mdupdated.Simplified
node.client.make_node(config, timeout=None)replacesScanner.make_node, the second copy of the proxy parsing inmaybe_utxo_info, and theScannerthat the connection test and the block lookup built only to make a node.BlockNotConnected(a subclass ofBlockInvalid) replaces matching"parent"in the error text during the full scan. New test.Scanner.node_busy()replaces the two copies of the latency rule.Added
tls_cert/tls_key, certificate made withopenssl): https answers, TLS 1.2 or newer, plain http on that port fails.Full suite: 251 tests pass locally. Changelog under
[Unreleased].