rostrum 8.0.0

An efficient implementation of Electrum Server with token support
Documentation
use crate::chaindef::OutPointHash;
use crate::chaindef::Transaction;
use crate::query::queryutil::get_tx_spending_prevout;
use crate::query::tx::TxQuery;
use crate::store::DBStore;
use anyhow::Result;
use std::sync::Arc;

pub struct ConfirmedQuery {
    txquery: Arc<TxQuery>,
}

impl ConfirmedQuery {
    pub fn new(txquery: Arc<TxQuery>) -> ConfirmedQuery {
        ConfirmedQuery { txquery }
    }

    pub(crate) fn get_tx_spending_prevout(
        &self,
        read_store: &DBStore,
        outpoint: &OutPointHash,
    ) -> Result<
        Option<(
            Transaction,
            u32, /* input index */
            u32, /* confirmation height */
        )>,
    > {
        get_tx_spending_prevout(read_store, &self.txquery, outpoint)
    }
}