X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=blobdiff_plain;f=lightning%2Fsrc%2Fln%2Freorg_tests.rs;h=9d02009f74e7ce25378b92f320a8910f95fc8b26;hb=7a50154d87650c022610d7d65713322cbf6b8422;hp=507dc34dfbe44a66a9505adb7e7aba60fca3951c;hpb=8886d1dc76ce7bd815634c738d114e7d3572c4fe;p=rust-lightning diff --git a/lightning/src/ln/reorg_tests.rs b/lightning/src/ln/reorg_tests.rs index 507dc34d..9d02009f 100644 --- a/lightning/src/ln/reorg_tests.rs +++ b/lightning/src/ln/reorg_tests.rs @@ -9,15 +9,15 @@ //! Further functional tests which test blockchain reorganizations. -use chain::channelmonitor::{ANTI_REORG_DELAY, ChannelMonitor}; -use chain::transaction::OutPoint; -use chain::{Confirm, Watch}; -use ln::channelmanager::{self, ChannelManager, ChannelManagerReadArgs}; -use ln::msgs::ChannelMessageHandler; -use util::enforcing_trait_impls::EnforcingSigner; -use util::events::{Event, MessageSendEvent, MessageSendEventsProvider, ClosureReason, HTLCDestination}; -use util::test_utils; -use util::ser::{ReadableArgs, Writeable}; +use crate::chain::channelmonitor::{ANTI_REORG_DELAY, ChannelMonitor}; +use crate::chain::transaction::OutPoint; +use crate::chain::{ChannelMonitorUpdateStatus, Confirm, Watch}; +use crate::ln::channelmanager::{self, ChannelManager, ChannelManagerReadArgs}; +use crate::ln::msgs::ChannelMessageHandler; +use crate::util::enforcing_trait_impls::EnforcingSigner; +use crate::util::events::{Event, MessageSendEvent, MessageSendEventsProvider, ClosureReason, HTLCDestination}; +use crate::util::test_utils; +use crate::util::ser::{ReadableArgs, Writeable}; use bitcoin::blockdata::block::{Block, BlockHeader}; use bitcoin::blockdata::script::Builder; @@ -25,12 +25,12 @@ use bitcoin::blockdata::opcodes; use bitcoin::hash_types::BlockHash; use bitcoin::secp256k1::Secp256k1; -use prelude::*; +use crate::prelude::*; use core::mem; use bitcoin::hashes::Hash; use bitcoin::TxMerkleNode; -use ln::functional_test_utils::*; +use crate::ln::functional_test_utils::*; fn do_test_onchain_htlc_reorg(local_commitment: bool, claim: bool) { // Our on-chain HTLC-claim learning has a few properties worth testing: @@ -342,7 +342,8 @@ fn do_test_unconf_chan(reload_node: bool, reorg_after_reload: bool, use_funding_ nodes[0].tx_broadcaster.txn_broadcasted.lock().unwrap().clear(); } - nodes[0].chain_monitor.watch_channel(chan_0_monitor.get_funding_txo().0.clone(), chan_0_monitor).unwrap(); + assert_eq!(nodes[0].chain_monitor.watch_channel(chan_0_monitor.get_funding_txo().0.clone(), chan_0_monitor), + ChannelMonitorUpdateStatus::Completed); check_added_monitors!(nodes[0], 1); }