浏览代码

drk: make the methods accessible in drk lib

oars 4 月之前
父节点
当前提交
bf75872aa4
共有 1 个文件被更改,包括 2 次插入2 次删除
  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",