@@ -13,6 +13,7 @@ use crate::chain;
13
13
use crate :: chain:: WatchedOutput ;
14
14
use crate :: chain:: chaininterface;
15
15
use crate :: chain:: chaininterface:: ConfirmationTarget ;
16
+ #[ cfg( test) ]
16
17
use crate :: chain:: chaininterface:: FEERATE_FLOOR_SATS_PER_KW ;
17
18
use crate :: chain:: chainmonitor;
18
19
use crate :: chain:: chainmonitor:: { MonitorUpdateId , UpdateOrigin } ;
@@ -25,6 +26,7 @@ use crate::events;
25
26
use crate :: events:: bump_transaction:: { WalletSource , Utxo } ;
26
27
use crate :: ln:: ChannelId ;
27
28
use crate :: ln:: channelmanager:: { ChannelDetails , self } ;
29
+ #[ cfg( test) ]
28
30
use crate :: ln:: chan_utils:: CommitmentTransaction ;
29
31
use crate :: ln:: features:: { ChannelFeatures , InitFeatures , NodeFeatures } ;
30
32
use crate :: ln:: { msgs, wire} ;
@@ -396,12 +398,14 @@ impl<'a> chain::Watch<TestChannelSigner> for TestChainMonitor<'a> {
396
398
}
397
399
}
398
400
401
+ #[ cfg( test) ]
399
402
struct JusticeTxData {
400
403
justice_tx : Transaction ,
401
404
value : u64 ,
402
405
commitment_number : u64 ,
403
406
}
404
407
408
+ #[ cfg( test) ]
405
409
pub ( crate ) struct WatchtowerPersister {
406
410
persister : TestPersister ,
407
411
/// Upon a new commitment_signed, we'll get a
@@ -415,6 +419,7 @@ pub(crate) struct WatchtowerPersister {
415
419
destination_script : ScriptBuf ,
416
420
}
417
421
422
+ #[ cfg( test) ]
418
423
impl WatchtowerPersister {
419
424
#[ cfg( test) ]
420
425
pub ( crate ) fn new ( destination_script : ScriptBuf ) -> Self {
@@ -445,6 +450,7 @@ impl WatchtowerPersister {
445
450
}
446
451
}
447
452
453
+ #[ cfg( test) ]
448
454
impl < Signer : sign:: ecdsa:: WriteableEcdsaChannelSigner > chainmonitor:: Persist < Signer > for WatchtowerPersister {
449
455
fn persist_new_channel ( & self , funding_txo : OutPoint ,
450
456
data : & channelmonitor:: ChannelMonitor < Signer > , id : MonitorUpdateId
0 commit comments