From a3432b41d1c683de1b8a4abebf8475cf837c51e1 Mon Sep 17 00:00:00 2001 From: Eason Date: Wed, 11 Oct 2023 15:49:42 +0800 Subject: [PATCH] revert some useless changes --- core/consensus/src/engine.rs | 4 ++-- core/run/src/lib.rs | 5 +---- protocol/src/traits/consensus.rs | 5 +---- 3 files changed, 4 insertions(+), 10 deletions(-) diff --git a/core/consensus/src/engine.rs b/core/consensus/src/engine.rs index fc857d743..e5dc4ce66 100644 --- a/core/consensus/src/engine.rs +++ b/core/consensus/src/engine.rs @@ -775,8 +775,8 @@ pub fn generate_new_crypto_map(metadata: Metadata) -> ProtocolResult( let hardfork_info = storage.hardfork_proposal(Default::default()).await?; let overlord_consensus = { let consensus_wal_path = config.data_path_for_consensus_wal(); - let bls_priv_key = - BlsPrivateKey::try_from(config.bls_privkey.as_ref()).map_err(MainError::Crypto)?; let node_info = Secp256k1PrivateKey::try_from(config.net_privkey.as_ref()) .map(|privkey| { NodeInfo::new( current_block.header.chain_id, privkey.pub_key(), - bls_priv_key.pub_key(&Default::default()), hardfork_info, ) }) diff --git a/protocol/src/traits/consensus.rs b/protocol/src/traits/consensus.rs index fd96bbe57..688e88260 100644 --- a/protocol/src/traits/consensus.rs +++ b/protocol/src/traits/consensus.rs @@ -3,7 +3,7 @@ use std::{ sync::{Arc, RwLock}, }; -use common_crypto::{BlsPublicKey, Secp256k1PublicKey}; +use common_crypto::Secp256k1PublicKey; use crate::types::{ Address, Block, BlockNumber, Bytes, ExecResp, HardforkInfoInner, Hash, Header, Hex, MerkleRoot, @@ -21,7 +21,6 @@ pub enum MessageTarget { pub struct NodeInfo { pub chain_id: u64, pub self_pub_key: Secp256k1PublicKey, - pub self_bls_pub_key: BlsPublicKey, pub self_address: Address, pub hardfork_proposals: Arc>>, } @@ -30,14 +29,12 @@ impl NodeInfo { pub fn new( chain_id: u64, pub_key: Secp256k1PublicKey, - bls_pub_key: BlsPublicKey, hardfork_info: Option, ) -> Self { let address = Address::from_pubkey(&pub_key); Self { chain_id, self_pub_key: pub_key, - self_bls_pub_key: bls_pub_key, self_address: address, hardfork_proposals: Arc::new(RwLock::new(hardfork_info)), }