- /// Checks if a given transaction matches the current filter.
- pub fn does_match_tx(&self, tx: &Transaction) -> bool {
- if self.watch_all {
- return true;
- }
- for out in tx.output.iter() {
- #[cfg(test)]
- for &(ref txid, ref script) in self.watched_txn.iter() {
- if *script == out.script_pubkey {
- if tx.txid() == *txid {
- return true;
- }
- }
- }
- #[cfg(not(test))]
- for script in self.watched_txn.iter() {
- if *script == out.script_pubkey {
- return true;
- }
- }
- }
- for input in tx.input.iter() {
- for outpoint in self.watched_outpoints.iter() {
- let &(outpoint_hash, outpoint_index) = outpoint;
- if outpoint_hash == input.previous_output.txid && outpoint_index == input.previous_output.vout {
- return true;
- }
- }
- }
- false
+ #[test]
+ fn test_fee_estimator_greater_than_floor() {
+ let sat_per_kw = FEERATE_FLOOR_SATS_PER_KW + 1;
+ let test_fee_estimator = &TestFeeEstimator { sat_per_kw };
+ let fee_estimator = LowerBoundedFeeEstimator::new(test_fee_estimator);
+
+ assert_eq!(fee_estimator.bounded_sat_per_1000_weight(ConfirmationTarget::Background), sat_per_kw);