Fix compilation errors: remove get_cookie_path call and fix type conversion
This commit is contained in:
parent
a6737bffc7
commit
8a1016652e
@ -432,8 +432,7 @@ async fn main() -> Result<()> {
|
||||
.set(PeerMap::new(HashMap::new()))
|
||||
.expect("PeerMap initialization failed");
|
||||
|
||||
// Connect the rpc daemon with retry logic
|
||||
let cookie_path = config.get_cookie_path().ok();
|
||||
// Connect the rpc daemon with retry logic
|
||||
let mut retry_count = 0;
|
||||
const MAX_RETRIES: u32 = 5;
|
||||
const RETRY_DELAY_MS: u64 = 2000; // 2 seconds initial delay
|
||||
@ -451,7 +450,7 @@ async fn main() -> Result<()> {
|
||||
return Err(e.context("Failed to connect to Bitcoin Core after multiple attempts"));
|
||||
}
|
||||
log::warn!("Failed to connect to Bitcoin Core (attempt {}/{}): {}", retry_count, MAX_RETRIES, e);
|
||||
std::thread::sleep(std::time::Duration::from_millis(RETRY_DELAY_MS * retry_count));
|
||||
std::thread::sleep(std::time::Duration::from_millis(RETRY_DELAY_MS * retry_count as u64));
|
||||
}
|
||||
}
|
||||
};
|
||||
|
Loading…
x
Reference in New Issue
Block a user