From 2c7e255feb0974873449e1924e6c4185f9a47bfd Mon Sep 17 00:00:00 2001 From: Eason Date: Mon, 30 Oct 2023 11:52:04 +0800 Subject: [PATCH] style: add some annotation --- core/consensus/src/util.rs | 2 ++ core/run/src/lib.rs | 1 + 2 files changed, 3 insertions(+) diff --git a/core/consensus/src/util.rs b/core/consensus/src/util.rs index f56b517f3..9e7959c14 100644 --- a/core/consensus/src/util.rs +++ b/core/consensus/src/util.rs @@ -38,6 +38,8 @@ pub fn time_now() -> u64 { /// `keccak256` hash calculation at the end of each height. The reason why not /// use address directly is that the `PeerId` is binding with public key not /// address. +/// The `common_ref` do not affect the signature verification, it is a +/// placeholder. pub struct OverlordCrypto { private_key: BlsPrivateKey, addr_pubkey: RwLock>, diff --git a/core/run/src/lib.rs b/core/run/src/lib.rs index 8e0c62439..ad5257955 100644 --- a/core/run/src/lib.rs +++ b/core/run/src/lib.rs @@ -368,6 +368,7 @@ fn init_crypto( bls_pub_keys.insert(address, pub_key); } + // The `common_ref` is a placeholder, use empty string. let crypto = OverlordCrypto::new(bls_priv_key, bls_pub_keys, String::new()); Ok(Arc::new(crypto)) }