+fn keysend<E: EntropySource>(
+ channel_manager: &ChannelManager, payee_pubkey: PublicKey, amt_msat: u64, entropy_source: &E,
+ outbound_payments: &mut PaymentInfoStorage, persister: Arc<FilesystemStore>,
+) {
+ let payment_preimage = PaymentPreimage(entropy_source.get_secure_random_bytes());
+ let payment_hash = PaymentHash(Sha256::hash(&payment_preimage.0[..]).into_inner());
+
+ let route_params = RouteParameters::from_payment_params_and_value(
+ PaymentParameters::for_keysend(payee_pubkey, 40, false),
+ amt_msat,
+ );
+ outbound_payments.payments.insert(