|
9 | 9 | // You may not use this file except in accordance with one or both of these |
10 | 10 | // licenses. |
11 | 11 |
|
12 | | -use bitcoin::hashes::hex::FromHex; |
13 | 12 | use bitcoin::hex::DisplayHex; |
14 | 13 | use bitcoin::secp256k1::{PublicKey, Scalar, Secp256k1, SecretKey, schnorr}; |
15 | 14 | use bitcoin::secp256k1::ecdh::SharedSecret; |
@@ -37,7 +36,7 @@ use crate::routing::router::{BlindedTail, Path, Payee, PaymentParameters, RouteH |
37 | 36 | use crate::sign::{NodeSigner, PeerStorageKey, ReceiveAuthKey, Recipient}; |
38 | 37 | use crate::util::config::UserConfig; |
39 | 38 | use crate::util::ser::{WithoutLength, Writeable}; |
40 | | -use crate::util::test_utils; |
| 39 | +use crate::util::test_utils::{self, bytes_from_hex, secret_from_hex, pubkey_from_hex}; |
41 | 40 | use lightning_invoice::RawBolt11Invoice; |
42 | 41 | use types::features::Features; |
43 | 42 | use crate::blinded_path::BlindedHop; |
@@ -1495,18 +1494,6 @@ fn blinded_payment_path_padding() { |
1495 | 1494 | claim_payment(&nodes[0], &[&nodes[1], &nodes[2], &nodes[3], &nodes[4]], payment_preimage); |
1496 | 1495 | } |
1497 | 1496 |
|
1498 | | -fn secret_from_hex(hex: &str) -> SecretKey { |
1499 | | - SecretKey::from_slice(&<Vec<u8>>::from_hex(hex).unwrap()).unwrap() |
1500 | | -} |
1501 | | - |
1502 | | -fn bytes_from_hex(hex: &str) -> Vec<u8> { |
1503 | | - <Vec<u8>>::from_hex(hex).unwrap() |
1504 | | -} |
1505 | | - |
1506 | | -fn pubkey_from_hex(hex: &str) -> PublicKey { |
1507 | | - PublicKey::from_slice(&<Vec<u8>>::from_hex(hex).unwrap()).unwrap() |
1508 | | -} |
1509 | | - |
1510 | 1497 | fn update_add_msg( |
1511 | 1498 | amount_msat: u64, cltv_expiry: u32, blinding_point: Option<PublicKey>, |
1512 | 1499 | onion_routing_packet: msgs::OnionPacket |
|
0 commit comments