Tweak how the Monero node is run for the processor tests

Disables the unused zmq RPC.

Removes authentication which seems to be unstable as hell when under load
(see #351).

No longer use Network::Isolated as it's not needed here (the Monero nodes run
with `--offline`).
This commit is contained in:
Luke Parker 2023-10-23 07:49:25 -04:00
parent 08180cc563
commit 7c10873cd5
No known key found for this signature in database

View file

@ -86,8 +86,9 @@ mod monero {
"--regtest".to_string(), "--regtest".to_string(),
"--offline".to_string(), "--offline".to_string(),
"--fixed-difficulty=1".to_string(), "--fixed-difficulty=1".to_string(),
"--no-zmq".to_string(),
"--disable-rpc-ban".to_string(),
"--rpc-bind-ip=0.0.0.0".to_string(), "--rpc-bind-ip=0.0.0.0".to_string(),
format!("--rpc-login=serai:seraidex"),
"--rpc-access-control-origins=*".to_string(), "--rpc-access-control-origins=*".to_string(),
"--confirm-external-bind".to_string(), "--confirm-external-bind".to_string(),
"--non-interactive".to_string(), "--non-interactive".to_string(),
@ -100,7 +101,7 @@ mod monero {
})) }))
.set_publish_all_ports(true); .set_publish_all_ports(true);
let mut test = DockerTest::new().with_network(dockertest::Network::Isolated); let mut test = DockerTest::new();
test.provide_container(composition); test.provide_container(composition);
test test
} }
@ -109,7 +110,7 @@ mod monero {
let handle = ops.handle("serai-dev-monero").host_port(18081).unwrap(); let handle = ops.handle("serai-dev-monero").host_port(18081).unwrap();
// TODO: Replace with a check if the node has booted // TODO: Replace with a check if the node has booted
tokio::time::sleep(core::time::Duration::from_secs(20)).await; tokio::time::sleep(core::time::Duration::from_secs(20)).await;
let monero = Monero::new(format!("http://serai:seraidex@{}:{}", handle.0, handle.1)); let monero = Monero::new(format!("http://{}:{}", handle.0, handle.1));
while monero.get_latest_block_number().await.unwrap() < 150 { while monero.get_latest_block_number().await.unwrap() < 150 {
monero.mine_block().await; monero.mine_block().await;
} }