Skip to content

Commit e398fe1

Browse files
fix: fix compile issue with get_raw_transaction_multi
1 parent c50a023 commit e398fe1

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

client/src/client.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -442,9 +442,8 @@ pub trait RpcApi: Sized {
442442
transactions_by_block_hash: BTreeMap<&BlockHash, Vec<&dashcore::Txid>>,
443443
) -> Result<BTreeMap<dashcore::Txid, Transaction>> {
444444
let mut args = [into_json(transactions_by_block_hash)?, into_json(false)?];
445-
let hex: String = self.call("getrawtransactionmulti", handle_defaults(&mut args, &[null()]))?;
446-
let bytes: Vec<u8> = FromHex::from_hex(&hex)?;
447-
Ok(dashcore::consensus::encode::deserialize(&bytes)?)
445+
let list = self.call::<Vec<(dashcore::Txid, Transaction)>>("getrawtransactionmulti", handle_defaults(&mut args, &[null()]))?;
446+
Ok(list.into_iter().collect())
448447
}
449448

450449
fn get_raw_transaction_hex(

0 commit comments

Comments
 (0)