projects
/
rust-lightning
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
get_route: fix outdated var name
[rust-lightning]
/
lightning-block-sync
/
src
/
init.rs
diff --git
a/lightning-block-sync/src/init.rs
b/lightning-block-sync/src/init.rs
index 7a8fada9c3c5b03663e586f137e05eb43c9b8903..5423bba5182e166e75aba7b49f719b1373017af2 100644
(file)
--- a/
lightning-block-sync/src/init.rs
+++ b/
lightning-block-sync/src/init.rs
@@
-47,10
+47,10
@@
BlockSourceResult<ValidatedBlockHeader> where B::Target: BlockSource {
/// use lightning::chain::channelmonitor::ChannelMonitor;
/// use lightning::chain::chaininterface::BroadcasterInterface;
/// use lightning::chain::chaininterface::FeeEstimator;
/// use lightning::chain::channelmonitor::ChannelMonitor;
/// use lightning::chain::chaininterface::BroadcasterInterface;
/// use lightning::chain::chaininterface::FeeEstimator;
-/// use lightning::
chain::keysinterface
;
-/// use lightning::
chain::keysinterface::KeysInterface
;
-/// use lightning::ln::channelmanager::
ChannelManager
;
-/// use lightning::
ln::channelmanager::ChannelManagerReadArgs
;
+/// use lightning::
sign
;
+/// use lightning::
sign::{EntropySource, NodeSigner, SignerProvider}
;
+/// use lightning::ln::channelmanager::
{ChannelManager, ChannelManagerReadArgs}
;
+/// use lightning::
routing::router::Router
;
/// use lightning::util::config::UserConfig;
/// use lightning::util::logger::Logger;
/// use lightning::util::ser::ReadableArgs;
/// use lightning::util::config::UserConfig;
/// use lightning::util::logger::Logger;
/// use lightning::util::ser::ReadableArgs;
@@
-61,41
+61,49
@@
BlockSourceResult<ValidatedBlockHeader> where B::Target: BlockSource {
///
/// async fn init_sync<
/// B: BlockSource,
///
/// async fn init_sync<
/// B: BlockSource,
-/// K: KeysInterface<Signer = S>,
-/// S: keysinterface::Sign,
+/// ES: EntropySource,
+/// NS: NodeSigner,
+/// SP: SignerProvider,
/// T: BroadcasterInterface,
/// F: FeeEstimator,
/// T: BroadcasterInterface,
/// F: FeeEstimator,
+/// R: Router,
/// L: Logger,
/// C: chain::Filter,
/// L: Logger,
/// C: chain::Filter,
-/// P: chainmonitor::Persist<S>,
+/// P: chainmonitor::Persist<S
P::Signer
>,
/// >(
/// block_source: &B,
/// >(
/// block_source: &B,
-/// chain_monitor: &ChainMonitor<S, &C, &T, &F, &L, &P>,
+/// chain_monitor: &ChainMonitor<S
P::Signer
, &C, &T, &F, &L, &P>,
/// config: UserConfig,
/// config: UserConfig,
-/// keys_manager: &K,
+/// entropy_source: &ES,
+/// node_signer: &NS,
+/// signer_provider: &SP,
/// tx_broadcaster: &T,
/// fee_estimator: &F,
/// tx_broadcaster: &T,
/// fee_estimator: &F,
+/// router: &R,
/// logger: &L,
/// persister: &P,
/// ) {
/// // Read a serialized channel monitor paired with the block hash when it was persisted.
/// let serialized_monitor = "...";
/// logger: &L,
/// persister: &P,
/// ) {
/// // Read a serialized channel monitor paired with the block hash when it was persisted.
/// let serialized_monitor = "...";
-/// let (monitor_block_hash, mut monitor) = <(BlockHash, ChannelMonitor<S>)>::read(
-/// &mut Cursor::new(&serialized_monitor),
keys_manager
).unwrap();
+/// let (monitor_block_hash, mut monitor) = <(BlockHash, ChannelMonitor<S
P::Signer
>)>::read(
+/// &mut Cursor::new(&serialized_monitor),
(entropy_source, signer_provider)
).unwrap();
///
/// // Read the channel manager paired with the block hash when it was persisted.
/// let serialized_manager = "...";
/// let (manager_block_hash, mut manager) = {
/// let read_args = ChannelManagerReadArgs::new(
///
/// // Read the channel manager paired with the block hash when it was persisted.
/// let serialized_manager = "...";
/// let (manager_block_hash, mut manager) = {
/// let read_args = ChannelManagerReadArgs::new(
-/// keys_manager,
+/// entropy_source,
+/// node_signer,
+/// signer_provider,
/// fee_estimator,
/// chain_monitor,
/// tx_broadcaster,
/// fee_estimator,
/// chain_monitor,
/// tx_broadcaster,
+/// router,
/// logger,
/// config,
/// vec![&mut monitor],
/// );
/// logger,
/// config,
/// vec![&mut monitor],
/// );
-/// <(BlockHash, ChannelManager<
S, &ChainMonitor<S, &C, &T, &F, &L, &P>, &T, &K, &F
, &L>)>::read(
+/// <(BlockHash, ChannelManager<
&ChainMonitor<SP::Signer, &C, &T, &F, &L, &P>, &T, &ES, &NS, &SP, &F, &R
, &L>)>::read(
/// &mut Cursor::new(&serialized_manager), read_args).unwrap()
/// };
///
/// &mut Cursor::new(&serialized_manager), read_args).unwrap()
/// };
///
@@
-173,7
+181,7
@@
pub async fn synchronize_listeners<B: Deref + Sized + Send + Sync, C: Cache, L:
let chain_listener = &ChainListenerSet(chain_listeners_at_height);
let mut chain_notifier = ChainNotifier { header_cache, chain_listener };
chain_notifier.connect_blocks(common_ancestor, most_connected_blocks, &mut chain_poller)
let chain_listener = &ChainListenerSet(chain_listeners_at_height);
let mut chain_notifier = ChainNotifier { header_cache, chain_listener };
chain_notifier.connect_blocks(common_ancestor, most_connected_blocks, &mut chain_poller)
- .await.
or_else(|(e, _)| Err(e)
)?;
+ .await.
map_err(|(e, _)| e
)?;
}
Ok(best_header)
}
Ok(best_header)