mirror of
https://github.com/bitcoinresearchkit/brk.git
synced 2026-04-24 06:39:58 -07:00
global: snapshot
This commit is contained in:
@@ -1,8 +1,9 @@
|
||||
use std::{thread::sleep, time::Duration};
|
||||
|
||||
use bitcoincore_rpc::{Client as CoreClient, Error as RpcError, jsonrpc};
|
||||
use brk_error::Result;
|
||||
use log::info;
|
||||
use parking_lot::RwLock;
|
||||
use std::time::Duration;
|
||||
|
||||
pub use bitcoincore_rpc::Auth;
|
||||
|
||||
@@ -55,7 +56,7 @@ impl ClientInner {
|
||||
"Retrying to connect to Bitcoin Core (attempt {}/{})",
|
||||
attempt, max_retries
|
||||
);
|
||||
std::thread::sleep(delay);
|
||||
sleep(delay);
|
||||
}
|
||||
|
||||
match f() {
|
||||
@@ -96,7 +97,7 @@ impl ClientInner {
|
||||
attempt, self.max_retries
|
||||
);
|
||||
self.recreate().ok();
|
||||
std::thread::sleep(self.retry_delay);
|
||||
sleep(self.retry_delay);
|
||||
}
|
||||
|
||||
match f(&self.client.read()) {
|
||||
|
||||
@@ -1,7 +1,10 @@
|
||||
use std::env;
|
||||
use std::path::{Path, PathBuf};
|
||||
use std::thread::sleep;
|
||||
use std::{mem, sync::Arc, time::Duration};
|
||||
use std::{
|
||||
env, mem,
|
||||
path::{Path, PathBuf},
|
||||
sync::Arc,
|
||||
thread::sleep,
|
||||
time::Duration,
|
||||
};
|
||||
|
||||
use bitcoin::{block::Header, consensus::encode};
|
||||
use bitcoincore_rpc::{
|
||||
|
||||
Reference in New Issue
Block a user