Struct bitcoin_txmempool::CoinsViewMemPool
source · pub struct CoinsViewMemPool { /* private fields */ }Expand description
| CoinsView that brings transactions | from a mempool into view. | | It does not check for spendings by memory | pool transactions. | | Instead, it provides access to all Coins | which are either unspent in the base | CCoinsView, are outputs from any mempool | transaction, or are tracked temporarily | to allow transaction dependencies | in package validation. | | This allows transaction replacement | to work as expected, as you want to have | all inputs “available” to check signatures, | and any cycles in the dependency graph | are checked directly in AcceptToMemoryPool. | | It also allows you to sign a double-spend | directly in signrawtransactionwithkey | and signrawtransactionwithwallet, | as long as the conflicting transaction | is not yet confirmed. |
Implementations§
source§impl CoinsViewMemPool
impl CoinsViewMemPool
pub fn new(base_in: *mut Box<dyn CoinsView>, mempool_in: &TxMemPool) -> Self
pub fn get_coin(&self, outpoint: &OutPoint, coin: &mut Coin) -> bool
sourcepub fn package_add_transaction(&mut self, tx: &TransactionRef)
pub fn package_add_transaction(&mut self, tx: &TransactionRef)
| Add the coins created by this transaction. | These coins are only temporarily stored | in m_temp_added and cannot be flushed | to the back end. Only used for package | validation. |