RpcBlockchain derefs to the underlying RPC Client
This commit is contained in:
parent
c9b1b6d076
commit
a8f9f6c43a
@ -50,6 +50,7 @@ use bitcoincore_rpc::{Client, RpcApi};
|
|||||||
use log::{debug, info};
|
use log::{debug, info};
|
||||||
use serde::{Deserialize, Serialize};
|
use serde::{Deserialize, Serialize};
|
||||||
use std::collections::{HashMap, HashSet};
|
use std::collections::{HashMap, HashSet};
|
||||||
|
use std::ops::Deref;
|
||||||
use std::path::PathBuf;
|
use std::path::PathBuf;
|
||||||
use std::thread;
|
use std::thread;
|
||||||
use std::time::Duration;
|
use std::time::Duration;
|
||||||
@ -67,6 +68,14 @@ pub struct RpcBlockchain {
|
|||||||
sync_params: RpcSyncParams,
|
sync_params: RpcSyncParams,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
impl Deref for RpcBlockchain {
|
||||||
|
type Target = Client;
|
||||||
|
|
||||||
|
fn deref(&self) -> &Self::Target {
|
||||||
|
&self.client
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/// RpcBlockchain configuration options
|
/// RpcBlockchain configuration options
|
||||||
#[derive(Debug, Serialize, Deserialize, Clone, PartialEq)]
|
#[derive(Debug, Serialize, Deserialize, Clone, PartialEq)]
|
||||||
pub struct RpcConfig {
|
pub struct RpcConfig {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user