@@ -775,10 +775,7 @@ impl Readable for IrrevocablyResolvedHTLC {
775
775
/// returned block hash and the the current chain and then reconnecting blocks to get to the
776
776
/// best chain) upon deserializing the object!
777
777
pub struct ChannelMonitor < Signer : WriteableEcdsaChannelSigner > {
778
- #[ cfg( test) ]
779
778
pub ( crate ) inner : Mutex < ChannelMonitorImpl < Signer > > ,
780
- #[ cfg( not( test) ) ]
781
- pub ( super ) inner : Mutex < ChannelMonitorImpl < Signer > > ,
782
779
}
783
780
784
781
impl < Signer : WriteableEcdsaChannelSigner > Clone for ChannelMonitor < Signer > where Signer : Clone {
@@ -877,9 +874,9 @@ pub(crate) struct ChannelMonitorImpl<Signer: WriteableEcdsaChannelSigner> {
877
874
// Obviously Correct (tm) if we just keep track of them explicitly.
878
875
outputs_to_watch : HashMap < Txid , Vec < ( u32 , ScriptBuf ) > > ,
879
876
880
- #[ cfg( test) ]
877
+ #[ cfg( any ( test, feature = "_test_utils" ) ) ]
881
878
pub onchain_tx_handler : OnchainTxHandler < Signer > ,
882
- #[ cfg( not( test) ) ]
879
+ #[ cfg( not( any ( test, feature = "_test_utils" ) ) ) ]
883
880
onchain_tx_handler : OnchainTxHandler < Signer > ,
884
881
885
882
// This is set when the Channel[Manager] generated a ChannelMonitorUpdate which indicated the
@@ -2498,7 +2495,7 @@ macro_rules! fail_unbroadcast_htlcs {
2498
2495
// witness length match (ie is 136 bytes long). We generate one here which we also use in some
2499
2496
// in-line tests later.
2500
2497
2501
- #[ cfg( test) ]
2498
+ #[ cfg( any ( test, feature = "_test_utils" ) ) ]
2502
2499
pub fn deliberately_bogus_accepted_htlc_witness_program ( ) -> Vec < u8 > {
2503
2500
use bitcoin:: blockdata:: opcodes;
2504
2501
let mut ret = [ opcodes:: all:: OP_NOP . to_u8 ( ) ; 136 ] ;
@@ -2510,7 +2507,7 @@ pub fn deliberately_bogus_accepted_htlc_witness_program() -> Vec<u8> {
2510
2507
Vec :: from ( & ret[ ..] )
2511
2508
}
2512
2509
2513
- #[ cfg( test) ]
2510
+ #[ cfg( any ( test, feature = "_test_utils" ) ) ]
2514
2511
pub fn deliberately_bogus_accepted_htlc_witness ( ) -> Vec < Vec < u8 > > {
2515
2512
vec ! [ Vec :: new( ) , Vec :: new( ) , Vec :: new( ) , Vec :: new( ) , deliberately_bogus_accepted_htlc_witness_program( ) . into( ) ] . into ( )
2516
2513
}
0 commit comments