projects
/
ldk-sample
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Upgrade LDK to 0.0.118
[ldk-sample]
/
src
/
main.rs
diff --git
a/src/main.rs
b/src/main.rs
index 50edb22ed54449d47d1f168c252ab05ff0ff7a6a..a33d667653291169fa87cc7eeed9faaa62580ced 100644
(file)
--- a/
src/main.rs
+++ b/
src/main.rs
@@
-139,7
+139,7
@@
pub(crate) type GossipVerifier = lightning_block_sync::gossip::GossipVerifier<
Arc<FilesystemLogger>,
SocketDescriptor,
Arc<ChannelManager>,
Arc<FilesystemLogger>,
SocketDescriptor,
Arc<ChannelManager>,
- Arc<
SimpleArcOnionMessenger<FilesystemLogger>
>,
+ Arc<
OnionMessenger
>,
IgnoringMessageHandler,
Arc<KeysManager>,
>;
IgnoringMessageHandler,
Arc<KeysManager>,
>;
@@
-158,7
+158,8
@@
pub(crate) type ChannelManager =
pub(crate) type NetworkGraph = gossip::NetworkGraph<Arc<FilesystemLogger>>;
pub(crate) type NetworkGraph = gossip::NetworkGraph<Arc<FilesystemLogger>>;
-type OnionMessenger = SimpleArcOnionMessenger<FilesystemLogger>;
+type OnionMessenger =
+ SimpleArcOnionMessenger<ChainMonitor, BitcoindClient, BitcoindClient, FilesystemLogger>;
pub(crate) type BumpTxEventHandler = BumpTransactionEventHandler<
Arc<BitcoindClient>,
pub(crate) type BumpTxEventHandler = BumpTransactionEventHandler<
Arc<BitcoindClient>,
@@
-358,6
+359,13
@@
async fn handle_ldk_events(
}
fs_store.write("", "", OUTBOUND_PAYMENTS_FNAME, &outbound.encode()).unwrap();
}
}
fs_store.write("", "", OUTBOUND_PAYMENTS_FNAME, &outbound.encode()).unwrap();
}
+ Event::InvoiceRequestFailed { payment_id } => {
+ print!("\nEVENT: Failed to request invoice to send payment with id {}", payment_id);
+ print!("> ");
+ io::stdout().flush().unwrap();
+
+ // TODO: mark the payment as failed
+ }
Event::PaymentForwarded {
prev_channel_id,
next_channel_id,
Event::PaymentForwarded {
prev_channel_id,
next_channel_id,
@@
-754,7
+762,7
@@
async fn start_ldk() {
Arc::clone(&keys_manager),
Arc::clone(&logger),
Arc::new(DefaultMessageRouter {}),
Arc::clone(&keys_manager),
Arc::clone(&logger),
Arc::new(DefaultMessageRouter {}),
-
IgnoringMessageHandler {}
,
+
Arc::clone(&channel_manager)
,
IgnoringMessageHandler {},
));
let mut ephemeral_bytes = [0; 32];
IgnoringMessageHandler {},
));
let mut ephemeral_bytes = [0; 32];