global: snapshot

This commit is contained in:
nym21
2025-12-26 22:41:36 +01:00
parent d538280f4b
commit de93f08e93
120 changed files with 1125 additions and 1773 deletions

View File

@@ -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()) {

View File

@@ -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::{