@@ -51,7 +51,7 @@ impl BitcoindRpcClient {
51
51
pub ( crate ) async fn broadcast_transaction ( & self , tx : & Transaction ) -> std:: io:: Result < Txid > {
52
52
let tx_serialized = bitcoin:: consensus:: encode:: serialize_hex ( tx) ;
53
53
let tx_json = serde_json:: json!( tx_serialized) ;
54
- self . rpc_client . call_method :: < Txid > ( "sendrawtransaction" , & vec ! [ tx_json] ) . await
54
+ self . rpc_client . call_method :: < Txid > ( "sendrawtransaction" , & [ tx_json] ) . await
55
55
}
56
56
57
57
pub ( crate ) async fn get_fee_estimate_for_target (
@@ -62,15 +62,15 @@ impl BitcoindRpcClient {
62
62
self . rpc_client
63
63
. call_method :: < FeeResponse > (
64
64
"estimatesmartfee" ,
65
- & vec ! [ num_blocks_json, estimation_mode_json] ,
65
+ & [ num_blocks_json, estimation_mode_json] ,
66
66
)
67
67
. await
68
68
. map ( |resp| resp. 0 )
69
69
}
70
70
71
71
pub ( crate ) async fn get_mempool_minimum_fee_rate ( & self ) -> std:: io:: Result < FeeRate > {
72
72
self . rpc_client
73
- . call_method :: < MempoolMinFeeResponse > ( "getmempoolinfo" , & vec ! [ ] )
73
+ . call_method :: < MempoolMinFeeResponse > ( "getmempoolinfo" , & [ ] )
74
74
. await
75
75
. map ( |resp| resp. 0 )
76
76
}
@@ -82,7 +82,7 @@ impl BitcoindRpcClient {
82
82
let txid_json = serde_json:: json!( txid_hex) ;
83
83
match self
84
84
. rpc_client
85
- . call_method :: < GetRawTransactionResponse > ( "getrawtransaction" , & vec ! [ txid_json] )
85
+ . call_method :: < GetRawTransactionResponse > ( "getrawtransaction" , & [ txid_json] )
86
86
. await
87
87
{
88
88
Ok ( resp) => Ok ( Some ( resp. 0 ) ) ,
@@ -116,7 +116,7 @@ impl BitcoindRpcClient {
116
116
pub ( crate ) async fn get_raw_mempool ( & self ) -> std:: io:: Result < Vec < Txid > > {
117
117
let verbose_flag_json = serde_json:: json!( false ) ;
118
118
self . rpc_client
119
- . call_method :: < GetRawMempoolResponse > ( "getrawmempool" , & vec ! [ verbose_flag_json] )
119
+ . call_method :: < GetRawMempoolResponse > ( "getrawmempool" , & [ verbose_flag_json] )
120
120
. await
121
121
. map ( |resp| resp. 0 )
122
122
}
@@ -125,7 +125,7 @@ impl BitcoindRpcClient {
125
125
let txid_hex = bitcoin:: consensus:: encode:: serialize_hex ( & txid) ;
126
126
let txid_json = serde_json:: json!( txid_hex) ;
127
127
self . rpc_client
128
- . call_method :: < GetMempoolEntryResponse > ( "getmempoolentry" , & vec ! [ txid_json] )
128
+ . call_method :: < GetMempoolEntryResponse > ( "getmempoolentry" , & [ txid_json] )
129
129
. await
130
130
. map ( |resp| MempoolEntry { txid, height : resp. height , time : resp. time } )
131
131
}
0 commit comments