File tree Expand file tree Collapse file tree 2 files changed +11
-0
lines changed
Expand file tree Collapse file tree 2 files changed +11
-0
lines changed Original file line number Diff line number Diff line change @@ -452,6 +452,12 @@ impl<S: Sleeper> AsyncClient<S> {
452452
453453 self . get_response_json ( & path) . await
454454 }
455+
456+ /// Get statistics about the mempool.
457+ pub async fn get_mempool_stats ( & self ) -> Result < MempoolStats , Error > {
458+ self . get_response_json ( "/mempool" ) . await
459+ }
460+
455461 /// Get an map where the key is the confirmation target (in number of
456462 /// blocks) and the value is the estimated feerate (in sat/vB).
457463 pub async fn get_fee_estimates ( & self ) -> Result < HashMap < u16 , f64 > , Error > {
Original file line number Diff line number Diff line change @@ -316,6 +316,11 @@ impl BlockingClient {
316316 . map ( |s| BlockHash :: from_str ( s. as_str ( ) ) . map_err ( Error :: HexToArray ) ) ?
317317 }
318318
319+ /// Get statistics about the mempool.
320+ pub fn get_mempool_stats ( & self ) -> Result < MempoolStats , Error > {
321+ self . get_response_json ( "/mempool" )
322+ }
323+
319324 /// Get an map where the key is the confirmation target (in number of
320325 /// blocks) and the value is the estimated feerate (in sat/vB).
321326 pub fn get_fee_estimates ( & self ) -> Result < HashMap < u16 , f64 > , Error > {
You can’t perform that action at this time.
0 commit comments