corepc_client/client_sync/v26/
blockchain.rs1#[macro_export]
14macro_rules! impl_client_v26__dump_tx_out_set {
15 () => {
16 impl Client {
17 pub fn dump_tx_out_set(&self, path: &str) -> Result<DumpTxOutSet> {
18 self.call("dumptxoutset", &[path.into()])
19 }
20 }
21 };
22}
23
24#[macro_export]
26macro_rules! impl_client_v26__get_chain_states {
27 () => {
28 impl Client {
29 pub fn get_chain_states(&self) -> Result<GetChainStates> {
30 self.call("getchainstates", &[])
31 }
32 }
33 };
34}
35
36#[macro_export]
38macro_rules! impl_client_v26__get_tx_out_set_info {
39 () => {
40 impl Client {
41 pub fn get_tx_out_set_info(&self) -> Result<GetTxOutSetInfo> {
42 self.call("gettxoutsetinfo", &[])
43 }
44 }
45 };
46}
47
48#[macro_export]
50macro_rules! impl_client_v26__import_mempool {
51 () => {
52 impl Client {
53 pub fn import_mempool(&self, filepath: &str) -> Result<()> {
54 match self.call("importmempool", &[filepath.into()]) {
55 Ok(serde_json::Value::Object(ref map)) if map.is_empty() => Ok(()),
56 Ok(res) => Err(Error::Returned(res.to_string())),
57 Err(err) => Err(err.into()),
58 }
59 }
60 }
61 };
62}
63
64#[macro_export]
66macro_rules! impl_client_v26__load_tx_out_set {
67 () => {
68 impl Client {
69 pub fn load_tx_out_set(&self, path: &str) -> Result<LoadTxOutSet> {
70 self.call("loadtxoutset", &[path.into()])
71 }
72 }
73 };
74}