|
| 1 | +// SPDX-License-Identifier: CC0-1.0 |
| 2 | + |
| 3 | +//! The JSON-RPC API for Bitcoin Core `v30` - blockchain. |
| 4 | +//! |
| 5 | +//! Types for methods found under the `== Blockchain ==` section of the API docs. |
| 6 | +
|
| 7 | +mod into; |
| 8 | + |
| 9 | +use serde::{Deserialize, Serialize}; |
| 10 | + |
| 11 | +pub use super::GetMempoolInfoError; |
| 12 | + |
| 13 | +/// Result of JSON-RPC method `getmempoolinfo` with verbose set to `true`. |
| 14 | +/// |
| 15 | +/// > getmempoolinfo |
| 16 | +/// > |
| 17 | +/// > Returns details on the active state of the TX memory pool. |
| 18 | +#[derive(Clone, Debug, PartialEq, Deserialize, Serialize)] |
| 19 | +#[cfg_attr(feature = "serde-deny-unknown-fields", serde(deny_unknown_fields))] |
| 20 | +pub struct GetMempoolInfo { |
| 21 | + /// True if the initial load attempt of the persisted mempool finished. |
| 22 | + pub loaded: bool, |
| 23 | + /// Current tx count. |
| 24 | + pub size: i64, |
| 25 | + /// Sum of all virtual transaction sizes as defined in BIP 141. |
| 26 | + /// |
| 27 | + /// Differs from actual serialized size because witness data is discounted. |
| 28 | + pub bytes: i64, |
| 29 | + /// Total memory usage for the mempool. |
| 30 | + pub usage: i64, |
| 31 | + /// Total fees for the mempool in BTC, ignoring modified fees through prioritisetransaction. |
| 32 | + pub total_fee: f64, |
| 33 | + /// Maximum memory usage for the mempool. |
| 34 | + #[serde(rename = "maxmempool")] |
| 35 | + pub max_mempool: i64, |
| 36 | + /// Minimum fee rate in BTC/kB for a transaction to be accepted. |
| 37 | + /// |
| 38 | + /// This is the maximum of `minrelaytxfee` and the minimum mempool fee. |
| 39 | + #[serde(rename = "mempoolminfee")] |
| 40 | + pub mempool_min_fee: f64, |
| 41 | + /// Current minimum relay fee for transactions. |
| 42 | + #[serde(rename = "minrelaytxfee")] |
| 43 | + pub min_relay_tx_fee: f64, |
| 44 | + /// Minimum fee rate increment for mempool limiting or replacement in BTC/kvB. |
| 45 | + #[serde(rename = "incrementalrelayfee")] |
| 46 | + pub incremental_relay_fee: f64, |
| 47 | + /// Current number of transactions that haven't passed initial broadcast yet. |
| 48 | + #[serde(rename = "unbroadcastcount")] |
| 49 | + pub unbroadcast_count: i64, |
| 50 | + /// True if the mempool accepts RBF without replaceability signaling inspection. |
| 51 | + #[serde(rename = "fullrbf")] |
| 52 | + pub full_rbf: bool, |
| 53 | + /// True if the mempool accepts transactions with bare multisig outputs. |
| 54 | + #[serde(rename = "permitbaremultisig")] |
| 55 | + pub permit_bare_multisig: bool, |
| 56 | + /// Maximum number of bytes that can be used by OP_RETURN outputs in the mempool. |
| 57 | + #[serde(rename = "maxdatacarriersize")] |
| 58 | + pub max_data_carrier_size: u64, |
| 59 | +} |
0 commit comments