Skip to content

Commit 51ff8ba

Browse files
author
Eason Gao
committed
refactor: remove the limitation of set ckb related info (#1517)
* refactor: remove limitation of set ckb related info * style: add some annotation
1 parent b4ff7bf commit 51ff8ba

File tree

3 files changed

+3
-4
lines changed

3 files changed

+3
-4
lines changed

core/consensus/src/util.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,8 @@ pub fn time_now() -> u64 {
3838
/// `keccak256` hash calculation at the end of each height. The reason why not
3939
/// use address directly is that the `PeerId` is binding with public key not
4040
/// address.
41+
/// The `common_ref` do not affect the signature verification, it is a
42+
/// placeholder.
4143
pub struct OverlordCrypto {
4244
private_key: BlsPrivateKey,
4345
addr_pubkey: RwLock<HashMap<Bytes, BlsPublicKey>>,

core/executor/src/system_contract/metadata/mod.rs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -86,10 +86,6 @@ impl<Adapter: ExecutorAdapter + ApplyBackend> SystemContract<Adapter>
8686
);
8787
}
8888
metadata_abi::MetadataContractCalls::SetCkbRelatedInfo(c) => {
89-
if !adapter.block_number().is_zero() {
90-
return revert_resp(gas_limit);
91-
}
92-
9389
exec_try!(
9490
store.set_ckb_related_info(&c.info.into()),
9591
gas_limit,

core/run/src/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -368,6 +368,7 @@ fn init_crypto(
368368
bls_pub_keys.insert(address, pub_key);
369369
}
370370

371+
// The `common_ref` is a placeholder, use empty string.
371372
let crypto = OverlordCrypto::new(bls_priv_key, bls_pub_keys, String::new());
372373
Ok(Arc::new(crypto))
373374
}

0 commit comments

Comments
 (0)