Fix compilation errors: remove get_cookie_path call and fix type conversion

This commit is contained in:
Nicolas Cantu 2025-08-22 13:50:52 +02:00 committed by Sosthene
parent 9958a2fb0a
commit a071d404d8

View File

@ -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));
}
}
};