kaspa_mining/model/tx_query.rs
1/// Indicates whether the mempool query result should include transactions/orphans or both
2pub enum TransactionQuery {
3 /// Include only non-orphan transactions from the ordinary mempool tx pool
4 TransactionsOnly,
5 /// Include orphan transactions only
6 OrphansOnly,
7 /// Include both orphan and non-orphan transactions
8 All,
9}
10
11impl TransactionQuery {
12 pub fn include_transaction_pool(&self) -> bool {
13 matches!(self, TransactionQuery::TransactionsOnly | TransactionQuery::All)
14 }
15
16 pub fn include_orphan_pool(&self) -> bool {
17 matches!(self, TransactionQuery::OrphansOnly | TransactionQuery::All)
18 }
19}