monerod: fix the PATH-empty test and the wallet-child doc overclaim
Review round 1 (artifact lens) on PR #91 found two defects. 1. `spawn_without_monerod_on_path_is_a_clear_error` passed `Some(OsStr::new(""))` as the search path. `std::env::split_paths("")` yields ONE empty element, so `find_in` probed the relative path `monerod` in the test's cwd and passed only because the crate root happened to hold no such file. Point it at an empty temp dir instead, which is what the card's "test by pointing PATH empty" asked for. Verified RED first: with an executable `./monerod` planted in the crate root, the old test fails ("spawn monerod: No such file or directory") and the new one passes with that same file still present. 2. The docs claimed a wiring the code does not perform: "The wallet child is pointed at that RPC with --daemon-address 127.0.0.1:18089". Nothing points anything — `--daemon-address` exists in `src/` only inside comments, and `Node::monerod_rpc_addr()` has no caller. docs/WALLET.md now tells the operator to point their own wallet child at the loopback RPC and says the address is only exposed programmatically. The same overclaim in the `monerod_rpc_addr` doc comment in src/node.rs is corrected too. Also one module-doc line for the non-blocking note: a port-liveness check cannot tell whose port it is, so a pre-existing listener on 18089 yields Ok for a child that failed to bind.
This commit is contained in:
parent
c45b008e97
commit
4ff95ce271
3 changed files with 18 additions and 8 deletions
|
|
@ -86,9 +86,12 @@ Set `ONIONWIRE_MONEROD=1` and the app starts the daemon itself — you do not ru
|
|||
`$ONIONWIRE_HOME/monero/` (mode 0700, never `/tmp` and never a shared location),
|
||||
and starts it with `--prune-blockchain --non-interactive`, its RPC bound to
|
||||
loopback only (`--rpc-bind-ip 127.0.0.1 --rpc-bind-port 18089`), logging to
|
||||
`$ONIONWIRE_HOME/monero/monerod.log`. The wallet child is pointed at that RPC
|
||||
with `--daemon-address 127.0.0.1:18089`; which process runs the wallet RPC (and
|
||||
how it is started) is separate from this and unchanged.
|
||||
`$ONIONWIRE_HOME/monero/monerod.log`. Point your wallet child at that RPC
|
||||
yourself — `--daemon-address 127.0.0.1:18089`, exactly like the daemon address in
|
||||
option 2 above. OnionWire does not configure the wallet child for you; the
|
||||
address is only *exposed* to callers as `Node::monerod_rpc_addr()`, so a wallet
|
||||
child left on its previous `--daemon-address` keeps using that one. Which process
|
||||
runs the wallet RPC (and how it is started) is separate from this and unchanged.
|
||||
|
||||
Zero trust is not optional here either: the spawn never passes
|
||||
`--trusted-daemon`, and the daemon's RPC is loopback so only this machine can
|
||||
|
|
|
|||
Loading…
Reference in a new issue