From c46aa1be7844a88fd2965c0441a740630fa10bee Mon Sep 17 00:00:00 2001 From: Stan Bondi Date: Thu, 12 Jan 2023 16:59:39 +0400 Subject: [PATCH] fix: vanity_id example should create id with base node features --- comms/core/examples/vanity_id.rs | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/comms/core/examples/vanity_id.rs b/comms/core/examples/vanity_id.rs index 37f9b635e2..f5bfd8cda1 100644 --- a/comms/core/examples/vanity_id.rs +++ b/comms/core/examples/vanity_id.rs @@ -32,7 +32,10 @@ use std::{ use anyhow::anyhow; use multiaddr::Multiaddr; use rand::rngs::OsRng; -use tari_comms::{peer_manager::NodeId, NodeIdentity}; +use tari_comms::{ + peer_manager::{NodeId, PeerFeatures}, + NodeIdentity, +}; use tari_crypto::{ keys::PublicKey, ristretto::RistrettoPublicKey, @@ -109,7 +112,11 @@ fn start_miner(id: usize, prefix: String, tx: mpsc::Sender) -> Res if node_id_hex[0..prefix.len()] == *prefix { if tx - .try_send(NodeIdentity::new(k, Multiaddr::empty(), Default::default())) + .try_send(NodeIdentity::new( + k, + Multiaddr::empty(), + PeerFeatures::COMMUNICATION_NODE, + )) .is_err() { eprintln!("Failed to send");