1 use chain::chaininterface;
2 use chain::chaininterface::ConfirmationTarget;
3 use ln::channelmonitor;
4 use ln::msgs::HandleError;
6 use bitcoin::blockdata::transaction::Transaction;
7 use bitcoin::util::hash::Sha256dHash;
11 pub struct TestFeeEstimator {
12 pub sat_per_vbyte: u64,
14 impl chaininterface::FeeEstimator for TestFeeEstimator {
15 fn get_est_sat_per_vbyte(&self, _confirmation_target: ConfirmationTarget) -> u64 {
20 pub struct TestChannelMonitor {
23 impl channelmonitor::ManyChannelMonitor for TestChannelMonitor {
24 fn add_update_monitor(&self, _funding_txo: (Sha256dHash, u16), _monitor: channelmonitor::ChannelMonitor) -> Result<(), HandleError> {
30 pub struct TestBroadcaster {
31 pub txn_broadcasted: Mutex<Vec<Transaction>>,
33 impl chaininterface::BroadcasterInterface for TestBroadcaster {
34 fn broadcast_transaction(&self, tx: &Transaction) {
35 self.txn_broadcasted.lock().unwrap().push(tx.clone());