Swap `PublicKey` for `NodeId` in `UnsignedNodeAnnouncement`
[rust-lightning] / lightning / src / routing / test_utils.rs
index 8666a65ecbd31175f6a1b74a25bbc852f1cb3442..b737bab352441a1b2a9289cc143e078ba6384c97 100644 (file)
@@ -66,7 +66,7 @@ pub(super) fn add_or_update_node(
        gossip_sync: &P2PGossipSync<Arc<NetworkGraph<Arc<test_utils::TestLogger>>>, Arc<test_utils::TestChainSource>, Arc<test_utils::TestLogger>>,
        secp_ctx: &Secp256k1<All>, node_privkey: &SecretKey, features: NodeFeatures, timestamp: u32
 ) {
-       let node_id = PublicKey::from_secret_key(&secp_ctx, node_privkey);
+       let node_id = NodeId::from_pubkey(&PublicKey::from_secret_key(&secp_ctx, node_privkey));
        let unsigned_announcement = UnsignedNodeAnnouncement {
                features,
                timestamp,