@@ -40,7 +40,7 @@ use lightning::sign::ChangeDestinationSourceSync;
40
40
use lightning:: sign:: EntropySource ;
41
41
use lightning:: sign:: OutputSpender ;
42
42
use lightning:: util:: logger:: Logger ;
43
- use lightning:: util:: persist:: { KVStore , Persister } ;
43
+ use lightning:: util:: persist:: { KVStoreSync , Persister } ;
44
44
use lightning:: util:: sweep:: OutputSweeper ;
45
45
#[ cfg( feature = "std" ) ]
46
46
use lightning:: util:: sweep:: OutputSweeperSync ;
@@ -652,8 +652,8 @@ use futures_util::{dummy_waker, OptionalSelector, Selector, SelectorOutput};
652
652
/// # impl lightning::util::logger::Logger for Logger {
653
653
/// # fn log(&self, _record: lightning::util::logger::Record) {}
654
654
/// # }
655
- /// # struct Store {}
656
- /// # impl lightning::util::persist::KVStore for Store {
655
+ /// # struct StoreSync {}
656
+ /// # impl lightning::util::persist::KVStoreSync for StoreSync {
657
657
/// # fn read(&self, primary_namespace: &str, secondary_namespace: &str, key: &str) -> io::Result<Vec<u8>> { Ok(Vec::new()) }
658
658
/// # fn write(&self, primary_namespace: &str, secondary_namespace: &str, key: &str, buf: &[u8]) -> io::Result<()> { Ok(()) }
659
659
/// # fn remove(&self, primary_namespace: &str, secondary_namespace: &str, key: &str, lazy: bool) -> io::Result<()> { Ok(()) }
@@ -669,22 +669,22 @@ use futures_util::{dummy_waker, OptionalSelector, Selector, SelectorOutput};
669
669
/// # fn send_data(&mut self, _data: &[u8], _resume_read: bool) -> usize { 0 }
670
670
/// # fn disconnect_socket(&mut self) {}
671
671
/// # }
672
- /// # type ChainMonitor<B, F, FE> = lightning::chain::chainmonitor::ChainMonitor<lightning::sign::InMemorySigner, Arc<F>, Arc<B>, Arc<FE>, Arc<Logger>, Arc<Store >, Arc<lightning::sign::KeysManager>>;
672
+ /// # type ChainMonitor<B, F, FE> = lightning::chain::chainmonitor::ChainMonitor<lightning::sign::InMemorySigner, Arc<F>, Arc<B>, Arc<FE>, Arc<Logger>, Arc<StoreSync >, Arc<lightning::sign::KeysManager>>;
673
673
/// # type NetworkGraph = lightning::routing::gossip::NetworkGraph<Arc<Logger>>;
674
674
/// # type P2PGossipSync<UL> = lightning::routing::gossip::P2PGossipSync<Arc<NetworkGraph>, Arc<UL>, Arc<Logger>>;
675
675
/// # type ChannelManager<B, F, FE> = lightning::ln::channelmanager::SimpleArcChannelManager<ChainMonitor<B, F, FE>, B, FE, Logger>;
676
676
/// # type OnionMessenger<B, F, FE> = lightning::onion_message::messenger::OnionMessenger<Arc<lightning::sign::KeysManager>, Arc<lightning::sign::KeysManager>, Arc<Logger>, Arc<ChannelManager<B, F, FE>>, Arc<lightning::onion_message::messenger::DefaultMessageRouter<Arc<NetworkGraph>, Arc<Logger>, Arc<lightning::sign::KeysManager>>>, Arc<ChannelManager<B, F, FE>>, lightning::ln::peer_handler::IgnoringMessageHandler, lightning::ln::peer_handler::IgnoringMessageHandler, lightning::ln::peer_handler::IgnoringMessageHandler>;
677
677
/// # type LiquidityManager<B, F, FE> = lightning_liquidity::LiquidityManager<Arc<lightning::sign::KeysManager>, Arc<ChannelManager<B, F, FE>>, Arc<F>>;
678
678
/// # type Scorer = RwLock<lightning::routing::scoring::ProbabilisticScorer<Arc<NetworkGraph>, Arc<Logger>>>;
679
- /// # type PeerManager<B, F, FE, UL> = lightning::ln::peer_handler::SimpleArcPeerManager<SocketDescriptor, ChainMonitor<B, F, FE>, B, FE, Arc<UL>, Logger, F, Store >;
679
+ /// # type PeerManager<B, F, FE, UL> = lightning::ln::peer_handler::SimpleArcPeerManager<SocketDescriptor, ChainMonitor<B, F, FE>, B, FE, Arc<UL>, Logger, F, StoreSync >;
680
680
/// #
681
681
/// # struct Node<
682
682
/// # B: lightning::chain::chaininterface::BroadcasterInterface + Send + Sync + 'static,
683
683
/// # F: lightning::chain::Filter + Send + Sync + 'static,
684
684
/// # FE: lightning::chain::chaininterface::FeeEstimator + Send + Sync + 'static,
685
685
/// # UL: lightning::routing::utxo::UtxoLookup + Send + Sync + 'static,
686
686
/// # D: lightning::sign::ChangeDestinationSource + Send + Sync + 'static,
687
- /// # K: lightning::util::persist::KVStore + Send + Sync + 'static,
687
+ /// # K: lightning::util::persist::KVStoreSync + Send + Sync + 'static,
688
688
/// # O: lightning::sign::OutputSpender + Send + Sync + 'static,
689
689
/// # > {
690
690
/// # peer_manager: Arc<PeerManager<B, F, FE, UL>>,
@@ -694,7 +694,7 @@ use futures_util::{dummy_waker, OptionalSelector, Selector, SelectorOutput};
694
694
/// # liquidity_manager: Arc<LiquidityManager<B, F, FE>>,
695
695
/// # chain_monitor: Arc<ChainMonitor<B, F, FE>>,
696
696
/// # gossip_sync: Arc<P2PGossipSync<UL>>,
697
- /// # persister: Arc<Store >,
697
+ /// # persister: Arc<StoreSync >,
698
698
/// # logger: Arc<Logger>,
699
699
/// # scorer: Arc<Scorer>,
700
700
/// # sweeper: Arc<OutputSweeper<Arc<B>, Arc<D>, Arc<FE>, Arc<F>, Arc<K>, Arc<Logger>, Arc<O>>>,
@@ -706,7 +706,7 @@ use futures_util::{dummy_waker, OptionalSelector, Selector, SelectorOutput};
706
706
/// # FE: lightning::chain::chaininterface::FeeEstimator + Send + Sync + 'static,
707
707
/// # UL: lightning::routing::utxo::UtxoLookup + Send + Sync + 'static,
708
708
/// # D: lightning::sign::ChangeDestinationSource + Send + Sync + 'static,
709
- /// # K: lightning::util::persist::KVStore + Send + Sync + 'static,
709
+ /// # K: lightning::util::persist::KVStoreSync + Send + Sync + 'static,
710
710
/// # O: lightning::sign::OutputSpender + Send + Sync + 'static,
711
711
/// # >(node: Node<B, F, FE, UL, D, K, O>) {
712
712
/// let background_persister = Arc::clone(&node.persister);
@@ -822,7 +822,7 @@ where
822
822
LM :: Target : ALiquidityManager ,
823
823
O :: Target : ' static + OutputSpender ,
824
824
D :: Target : ' static + ChangeDestinationSource ,
825
- K :: Target : ' static + KVStore ,
825
+ K :: Target : ' static + KVStoreSync ,
826
826
{
827
827
let mut should_break = false ;
828
828
let async_event_handler = |event| {
@@ -1018,7 +1018,7 @@ impl BackgroundProcessor {
1018
1018
LM :: Target : ALiquidityManager ,
1019
1019
D :: Target : ChangeDestinationSourceSync ,
1020
1020
O :: Target : ' static + OutputSpender ,
1021
- K :: Target : ' static + KVStore ,
1021
+ K :: Target : ' static + KVStoreSync ,
1022
1022
{
1023
1023
let stop_thread = Arc :: new ( AtomicBool :: new ( false ) ) ;
1024
1024
let stop_thread_clone = Arc :: clone ( & stop_thread) ;
@@ -1186,7 +1186,8 @@ mod tests {
1186
1186
use lightning:: types:: payment:: PaymentHash ;
1187
1187
use lightning:: util:: config:: UserConfig ;
1188
1188
use lightning:: util:: persist:: {
1189
- KVStore , CHANNEL_MANAGER_PERSISTENCE_KEY , CHANNEL_MANAGER_PERSISTENCE_PRIMARY_NAMESPACE ,
1189
+ KVStoreSync , CHANNEL_MANAGER_PERSISTENCE_KEY ,
1190
+ CHANNEL_MANAGER_PERSISTENCE_PRIMARY_NAMESPACE ,
1190
1191
CHANNEL_MANAGER_PERSISTENCE_SECONDARY_NAMESPACE , NETWORK_GRAPH_PERSISTENCE_KEY ,
1191
1192
NETWORK_GRAPH_PERSISTENCE_PRIMARY_NAMESPACE , NETWORK_GRAPH_PERSISTENCE_SECONDARY_NAMESPACE ,
1192
1193
SCORER_PERSISTENCE_KEY , SCORER_PERSISTENCE_PRIMARY_NAMESPACE ,
@@ -1420,7 +1421,7 @@ mod tests {
1420
1421
}
1421
1422
}
1422
1423
1423
- impl KVStore for Persister {
1424
+ impl KVStoreSync for Persister {
1424
1425
fn read (
1425
1426
& self , primary_namespace : & str , secondary_namespace : & str , key : & str ,
1426
1427
) -> lightning:: io:: Result < Vec < u8 > > {
0 commit comments