# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[dependencies]
-lightning = { version = "0.0.114", features = ["max_level_trace"] }
-lightning-block-sync = { version = "0.0.114", features = [ "rpc-client" ] }
-lightning-invoice = { version = "0.22" }
-lightning-net-tokio = { version = "0.0.114" }
-lightning-persister = { version = "0.0.114" }
-lightning-background-processor = { version = "0.0.114" }
-lightning-rapid-gossip-sync = { version = "0.0.114" }
+lightning = { version = "0.0.115", features = ["max_level_trace"] }
+lightning-block-sync = { version = "0.0.115", features = [ "rpc-client" ] }
+lightning-invoice = { version = "0.23" }
+lightning-net-tokio = { version = "0.0.115" }
+lightning-persister = { version = "0.0.115" }
+lightning-background-processor = { version = "0.0.115" }
+lightning-rapid-gossip-sync = { version = "0.0.115" }
base64 = "0.13.0"
bitcoin = "0.29.0"
use bitcoin::network::constants::Network;
use bitcoin::secp256k1::PublicKey;
use lightning::chain::keysinterface::{EntropySource, KeysManager};
-use lightning::ln::channelmanager::{PaymentId, Retry};
+use lightning::ln::channelmanager::{PaymentId, RecipientOnionFields, Retry};
use lightning::ln::msgs::NetAddress;
use lightning::ln::{PaymentHash, PaymentPreimage};
use lightning::onion_message::{CustomOnionMessageContents, Destination, OnionMessageContents};
};
let status = match channel_manager.send_spontaneous_payment_with_retry(
Some(payment_preimage),
+ RecipientOnionFields::spontaneous_empty(),
PaymentId(payment_hash.0),
route_params,
Retry::Timeout(Duration::from_secs(10)),
use lightning::routing::gossip::{NodeId, P2PGossipSync};
use lightning::routing::router::DefaultRouter;
use lightning::util::config::UserConfig;
-use lightning::util::events::{Event, PaymentPurpose};
+use lightning::events::{Event, PaymentPurpose};
use lightning::util::ser::ReadableArgs;
use lightning_background_processor::{BackgroundProcessor, GossipSync};
use lightning_block_sync::init;
receiver_node_id: _,
via_channel_id: _,
via_user_channel_id: _,
+ claim_deadline: _,
+ onion_fields: _,
} => {
println!(
"\nEVENT: received payment from payment hash {} of {} millisatoshis",
next_channel_id,
fee_earned_msat,
claim_from_onchain_tx,
+ outbound_amount_forwarded_msat,
} => {
let read_only_network_graph = network_graph.read_only();
let nodes = read_only_network_graph.nodes();
} else {
"from HTLC fulfill message"
};
+ let amt_args = if let Some(v) = outbound_amount_forwarded_msat {
+ format!("{}", v)
+ } else {
+ "?".to_string()
+ };
if let Some(fee_earned) = fee_earned_msat {
println!(
- "\nEVENT: Forwarded payment{}{}, earning {} msat {}",
- from_prev_str, to_next_str, fee_earned, from_onchain_str
+ "\nEVENT: Forwarded payment for {} msat{}{}, earning {} msat {}",
+ amt_args, from_prev_str, to_next_str, fee_earned, from_onchain_str
);
} else {
println!(
- "\nEVENT: Forwarded payment{}{}, claiming onchain {}",
- from_prev_str, to_next_str, from_onchain_str
+ "\nEVENT: Forwarded payment for {} msat{}{}, claiming onchain {}",
+ amt_args, from_prev_str, to_next_str, from_onchain_str
);
}
print!("> ");
.unwrap();
bitcoind_client.broadcast_transaction(&spending_tx);
}
+ Event::ChannelPending { .. } => {}
Event::ChannelReady {
ref channel_id,
user_channel_id: _,