Skip to content

Commit 217197c

Browse files
committed
feat: add get_quorum_info_reversed
1 parent 837205f commit 217197c

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

rpc-client/src/client.rs

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1274,6 +1274,22 @@ pub trait RpcApi: Sized {
12741274
self.call::<json::QuorumInfoResult>("quorum", handle_defaults(&mut args, &[null()]))
12751275
}
12761276

1277+
/// Returns information about a specific quorum with quorum hash reversed
1278+
/// This is incorrect response format, but it was used by platform and we need to support it
1279+
fn get_quorum_info_reversed(
1280+
&self,
1281+
llmq_type: QuorumType,
1282+
quorum_hash: &QuorumHash,
1283+
include_sk_share: Option<bool>,
1284+
) -> Result<json::QuorumInfoResult> {
1285+
let mut result =
1286+
self.get_quorum_info(llmq_type, &quorum_hash.reverse(), include_sk_share)?;
1287+
1288+
result.quorum_hash = quorum_hash.reverse();
1289+
1290+
Ok(result)
1291+
}
1292+
12771293
/// Returns the status of the current DKG process
12781294
fn get_quorum_dkgstatus(&self, detail_level: Option<u8>) -> Result<json::QuorumDKGStatus> {
12791295
let mut args = ["dkgstatus".into(), opt_into_json(detail_level)?];

0 commit comments

Comments
 (0)