tui: the Cuprate start path answers get_info, and the Linux TUI includes it
Some checks failed
ci / test (pull_request) Failing after 2m50s
ci / sdk (pull_request) Successful in 1m23s
android-ci / android (pull_request) Successful in 12m40s

Node::start_wallet_child is the call the TUI makes. The test stores an
in-process testnet source, starts the child, and checks the typed daemon
client's get_info. It does not bootstrap Tor.

cuprate-daemon is now in the Linux TUI default, so a release build of the
onionwire bin links the daemon with no extra feature flag. A build with
--no-default-features still refuses with NO_FEATURE_MSG. cuprated keeps
default-features = false so Cuprate's arti feature cannot pull arti-client
0.44 next to OnionWire's 0.46.

Cargo.lock is unchanged: cuprated was already an optional dependency.
This commit is contained in:
agent 2026-10-08 10:59:45 -04:00
commit a466c43764
No known key found for this signature in database
6 changed files with 218 additions and 11 deletions

View file

@ -2150,6 +2150,7 @@ mod tests {
#[cfg(feature = "cuprate-daemon")]
#[test]
fn in_process_source_launches_a_daemon_and_stop_shuts_it_down() {
let _port = super::test_support::unrestricted_port_lock();
let dir = tmp_dir("cuprate-on");
let store = open_store(&dir);
let rpc_log = dir.join("wallet-rpc.argv");
@ -2204,6 +2205,7 @@ mod tests {
#[cfg(feature = "cuprate-daemon")]
#[test]
fn a_start_that_fails_after_the_daemon_came_up_leaves_nothing_running() {
let _port = super::test_support::unrestricted_port_lock();
let dir = tmp_dir("cuprate-late-failure");
let store = open_store(&dir);
let rpc_log = dir.join("wallet-rpc.argv");
@ -2370,6 +2372,18 @@ pub(crate) mod test_support {
use std::sync::atomic::{AtomicBool, Ordering};
use std::time::{Duration, SystemTime};
/// Every in-process launch binds [`DEFAULT_MONEROD_RPC_PORT`]. `cargo test`
/// runs those tests in parallel, so they take this for the whole launch
/// and the stop that follows.
///
/// ponytail: one process-wide lock. A free port per launch would also have
/// to move the wallet child's `--daemon-address`, which is the constant.
#[cfg(feature = "cuprate-daemon")]
pub(crate) fn unrestricted_port_lock() -> std::sync::MutexGuard<'static, ()> {
static LOCK: std::sync::Mutex<()> = std::sync::Mutex::new(());
LOCK.lock().unwrap_or_else(|e| e.into_inner())
}
/// Holds every `--rpc-bind-port` a watched argv log publishes, for as long
/// as this value lives.
///