@@ -65,7 +65,7 @@ use core::{cmp, mem};
65
65
use core:: cell:: RefCell ;
66
66
use io:: Read ;
67
67
use sync:: { Arc , Condvar , Mutex , MutexGuard , RwLock , RwLockReadGuard } ;
68
- use core:: sync:: atomic:: { AtomicUsize , Ordering } ;
68
+ use core:: sync:: atomic:: { AtomicBool , AtomicUsize , Ordering } ;
69
69
use core:: time:: Duration ;
70
70
use core:: ops:: Deref ;
71
71
@@ -688,6 +688,7 @@ pub struct ChannelManager<Signer: Sign, M: Deref, T: Deref, K: Deref, F: Deref,
688
688
{
689
689
default_configuration : UserConfig ,
690
690
genesis_hash : BlockHash ,
691
+ advertise_onion_message_support : AtomicBool ,
691
692
fee_estimator : LowerBoundedFeeEstimator < F > ,
692
693
chain_monitor : M ,
693
694
tx_broadcaster : T ,
@@ -1592,6 +1593,7 @@ impl<Signer: Sign, M: Deref, T: Deref, K: Deref, F: Deref, L: Deref> ChannelMana
1592
1593
ChannelManager {
1593
1594
default_configuration : config. clone ( ) ,
1594
1595
genesis_hash : genesis_block ( params. network ) . header . block_hash ( ) ,
1596
+ advertise_onion_message_support : AtomicBool :: new ( false ) ,
1595
1597
fee_estimator : LowerBoundedFeeEstimator :: new ( fee_est) ,
1596
1598
chain_monitor,
1597
1599
tx_broadcaster,
@@ -6236,7 +6238,9 @@ impl<Signer: Sign, M: Deref , T: Deref , K: Deref , F: Deref , L: Deref >
6236
6238
}
6237
6239
}
6238
6240
6239
- fn advertise_onion_message_support ( & self ) { }
6241
+ fn advertise_onion_message_support ( & self ) {
6242
+ self . advertise_onion_message_support . store ( true , Ordering :: Release ) ;
6243
+ }
6240
6244
}
6241
6245
6242
6246
/// Used to signal to the ChannelManager persister that the manager needs to be re-persisted to
@@ -7283,6 +7287,7 @@ impl<'a, Signer: Sign, M: Deref, T: Deref, K: Deref, F: Deref, L: Deref>
7283
7287
7284
7288
let channel_manager = ChannelManager {
7285
7289
genesis_hash,
7290
+ advertise_onion_message_support : AtomicBool :: new ( false ) ,
7286
7291
fee_estimator : bounded_fee_estimator,
7287
7292
chain_monitor : args. chain_monitor ,
7288
7293
tx_broadcaster : args. tx_broadcaster ,
0 commit comments