helper: add --light-mode for p2pool

This commit is contained in:
hinto.janai 2023-06-05 08:25:08 -04:00
parent 9ac5335321
commit 34abbe73fa
No known key found for this signature in database
GPG key ID: D47CE05FA175A499

View file

@ -402,9 +402,10 @@ impl Helper {
args.push("--rpc-port".to_string()); args.push(rpc.to_string()); // RPC Port args.push("--rpc-port".to_string()); args.push(rpc.to_string()); // RPC Port
args.push("--zmq-port".to_string()); args.push(zmq.to_string()); // ZMQ Port args.push("--zmq-port".to_string()); args.push(zmq.to_string()); // ZMQ Port
args.push("--data-api".to_string()); args.push(api_path.display().to_string()); // API Path args.push("--data-api".to_string()); args.push(api_path.display().to_string()); // API Path
args.push("--local-api".to_string()); // Enable API args.push("--local-api".to_string()); // Enable API
args.push("--no-color".to_string()); // Remove color escape sequences, Gupax terminal can't parse it :( args.push("--no-color".to_string()); // Remove color escape sequences, Gupax terminal can't parse it :(
args.push("--mini".to_string()); // P2Pool Mini args.push("--mini".to_string()); // P2Pool Mini
args.push("--light-mode".to_string()); // Assume user is not using P2Pool to mine.
*lock2!(helper,img_p2pool) = ImgP2pool { *lock2!(helper,img_p2pool) = ImgP2pool {
mini: "P2Pool Mini".to_string(), mini: "P2Pool Mini".to_string(),
address: Self::head_tail_of_monero_address(&state.address), address: Self::head_tail_of_monero_address(&state.address),
@ -455,6 +456,7 @@ impl Helper {
args.push("--data-api".to_string()); args.push(api_path.display().to_string()); // API Path args.push("--data-api".to_string()); args.push(api_path.display().to_string()); // API Path
args.push("--local-api".to_string()); // Enable API args.push("--local-api".to_string()); // Enable API
args.push("--no-color".to_string()); // Remove color escape sequences args.push("--no-color".to_string()); // Remove color escape sequences
args.push("--light-mode".to_string()); // Assume user is not using P2Pool to mine.
if state.mini { args.push("--mini".to_string()); }; // Mini if state.mini { args.push("--mini".to_string()); }; // Mini
*lock2!(helper,img_p2pool) = ImgP2pool { *lock2!(helper,img_p2pool) = ImgP2pool {
mini: if state.mini { "P2Pool Mini".to_string() } else { "P2Pool Main".to_string() }, mini: if state.mini { "P2Pool Mini".to_string() } else { "P2Pool Main".to_string() },