Skip to content

Commit e81354b

Browse files
committed
break out of the mining loop if a solution is found in single key mode
1 parent 8cd2491 commit e81354b

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/mining.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ use crate::data_types::{DataDir, DataDirMnemonic, MiningContext, MiningResult, C
55
use crate::cli::Cli;
66
use crate::cardano;
77
use crate::utils::{self, next_wallet_deriv_index_for_challenge, print_mining_setup, print_statistics, receipt_exists_for_index, run_single_mining_cycle};
8-
use std::{fs};
8+
use std::{fs, path::PathBuf}; // Added fs, path::PathBuf
99

1010
// ===============================================
1111
// SOLUTION RECOVERY FUNCTION
@@ -124,8 +124,8 @@ pub fn run_persistent_key_mining(context: MiningContext, skey_hex: &String) -> R
124124
}
125125
}
126126

127-
println!("\n✅ Solution queued. Continuing mining immediately.");
128-
// Continue the loop on the same address.
127+
println!("\n✅ Solution queued. Checking for new challenge/expiration.");
128+
break; // Break the inner loop to re-poll the challenge API.
129129
},
130130
MiningResult::AlreadySolved => {
131131
println!("\n✅ Challenge already solved on network. Stopping current mining.");

0 commit comments

Comments
 (0)