From 1b135545165c78a7f275fee2faf33fb4d4ea4c00 Mon Sep 17 00:00:00 2001 From: Samuel Dare Date: Wed, 10 Jan 2024 14:29:50 +0000 Subject: [PATCH] fix: peer id generation encoding --- core/cli/src/args/generate_keypair.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/cli/src/args/generate_keypair.rs b/core/cli/src/args/generate_keypair.rs index b2384a73b..28ba87cbd 100644 --- a/core/cli/src/args/generate_keypair.rs +++ b/core/cli/src/args/generate_keypair.rs @@ -64,7 +64,7 @@ pub struct Keypair { pub net_private_key: Hex, pub public_key: Hex, pub address: Address, - pub peer_id: Hex, + pub peer_id: String, pub bls_private_key: Hex, pub bls_public_key: Hex, } @@ -94,7 +94,7 @@ impl Keypair { net_private_key: Hex::encode(&net_seckey), public_key: Hex::encode(&pubkey), address: Address::from_pubkey_bytes(pubkey).map_err(Error::Running)?, - peer_id: Hex::encode(secio_keypair.public_key().peer_id().to_base58()), + peer_id: secio_keypair.public_key().peer_id().to_base58(), bls_private_key: Hex::encode(&bls_seckey), bls_public_key: Hex::encode(bls_pub_key.to_bytes()), })