@@ -13,6 +13,7 @@ use crate::chain;
1313use crate :: chain:: WatchedOutput ;
1414use crate :: chain:: chaininterface;
1515use crate :: chain:: chaininterface:: ConfirmationTarget ;
16+ #[ cfg( test) ]
1617use crate :: chain:: chaininterface:: FEERATE_FLOOR_SATS_PER_KW ;
1718use crate :: chain:: chainmonitor;
1819use crate :: chain:: chainmonitor:: { MonitorUpdateId , UpdateOrigin } ;
@@ -25,6 +26,7 @@ use crate::events;
2526use crate :: events:: bump_transaction:: { WalletSource , Utxo } ;
2627use crate :: ln:: ChannelId ;
2728use crate :: ln:: channelmanager:: { ChannelDetails , self } ;
29+ #[ cfg( test) ]
2830use crate :: ln:: chan_utils:: CommitmentTransaction ;
2931use crate :: ln:: features:: { ChannelFeatures , InitFeatures , NodeFeatures } ;
3032use crate :: ln:: { msgs, wire} ;
@@ -396,12 +398,14 @@ impl<'a> chain::Watch<TestChannelSigner> for TestChainMonitor<'a> {
396398 }
397399}
398400
401+ #[ cfg( test) ]
399402struct JusticeTxData {
400403 justice_tx : Transaction ,
401404 value : u64 ,
402405 commitment_number : u64 ,
403406}
404407
408+ #[ cfg( test) ]
405409pub ( crate ) struct WatchtowerPersister {
406410 persister : TestPersister ,
407411 /// Upon a new commitment_signed, we'll get a
@@ -415,6 +419,7 @@ pub(crate) struct WatchtowerPersister {
415419 destination_script : ScriptBuf ,
416420}
417421
422+ #[ cfg( test) ]
418423impl WatchtowerPersister {
419424 #[ cfg( test) ]
420425 pub ( crate ) fn new ( destination_script : ScriptBuf ) -> Self {
@@ -445,6 +450,7 @@ impl WatchtowerPersister {
445450 }
446451}
447452
453+ #[ cfg( test) ]
448454impl < Signer : sign:: ecdsa:: WriteableEcdsaChannelSigner > chainmonitor:: Persist < Signer > for WatchtowerPersister {
449455 fn persist_new_channel ( & self , funding_txo : OutPoint ,
450456 data : & channelmonitor:: ChannelMonitor < Signer > , id : MonitorUpdateId
0 commit comments