Fix compilation errors: remove get_cookie_path call and fix type conversion
This commit is contained in:
parent
22c3ef33e3
commit
b46529682c
@ -432,8 +432,7 @@ async fn main() -> Result<()> {
|
|||||||
.set(PeerMap::new(HashMap::new()))
|
.set(PeerMap::new(HashMap::new()))
|
||||||
.expect("PeerMap initialization failed");
|
.expect("PeerMap initialization failed");
|
||||||
|
|
||||||
// Connect the rpc daemon with retry logic
|
// Connect the rpc daemon with retry logic
|
||||||
let cookie_path = config.get_cookie_path().ok();
|
|
||||||
let mut retry_count = 0;
|
let mut retry_count = 0;
|
||||||
const MAX_RETRIES: u32 = 5;
|
const MAX_RETRIES: u32 = 5;
|
||||||
const RETRY_DELAY_MS: u64 = 2000; // 2 seconds initial delay
|
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"));
|
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);
|
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