diff --git a/node/rpc/src/admin/api.rs b/node/rpc/src/admin/api.rs index 260409e..d26962c 100644 --- a/node/rpc/src/admin/api.rs +++ b/node/rpc/src/admin/api.rs @@ -40,5 +40,9 @@ pub trait Rpc { async fn get_peers(&self) -> RpcResult>; #[method(name = "getFileLocation")] - async fn get_file_location(&self, tx_seq: u64) -> RpcResult>>; + async fn get_file_location( + &self, + tx_seq: u64, + all_shards: bool, + ) -> RpcResult>>; } diff --git a/node/rpc/src/admin/impl.rs b/node/rpc/src/admin/impl.rs index afabe7f..8ec5b4f 100644 --- a/node/rpc/src/admin/impl.rs +++ b/node/rpc/src/admin/impl.rs @@ -185,7 +185,11 @@ impl RpcServer for RpcServerImpl { .collect()) } - async fn get_file_location(&self, tx_seq: u64) -> RpcResult>> { + async fn get_file_location( + &self, + tx_seq: u64, + all_shards: bool, + ) -> RpcResult>> { let tx = match self.ctx.log_store.get_tx_by_seq_number(tx_seq).await? { Some(tx) => tx, None => { @@ -221,7 +225,7 @@ impl RpcServer for RpcServerImpl { shard_config: shard_config.unwrap(), }) .collect(); - if all_shards_available(info.iter().map(|info| info.shard_config).collect()) { + if all_shards && all_shards_available(info.iter().map(|info| info.shard_config).collect()) { Ok(Some(info)) } else { Ok(None)