Ver Fonte

drk: make the methods accessible in drk lib

oars há 4 meses atrás
pai
commit
bf75872aa4
1 ficheiros alterados com 2 adições e 2 exclusões
  1. 2 2
      bin/drk/src/rpc.rs

+ 2 - 2
bin/drk/src/rpc.rs

@@ -434,7 +434,7 @@ impl Drk {
     }
 
     // Queries darkfid for last confirmed block.
-    async fn get_last_confirmed_block(&self) -> Result<(u32, String)> {
+    pub async fn get_last_confirmed_block(&self) -> Result<(u32, String)> {
         let rep = self
             .darkfid_daemon_request("blockchain.last_confirmed_block", &JsonValue::Array(vec![]))
             .await?;
@@ -446,7 +446,7 @@ impl Drk {
     }
 
     // Queries darkfid for a block with given height.
-    async fn get_block_by_height(&self, height: u32) -> Result<BlockInfo> {
+    pub async fn get_block_by_height(&self, height: u32) -> Result<BlockInfo> {
         let params = self
             .darkfid_daemon_request(
                 "blockchain.get_block",