diff --git a/base_layer/core/src/chain_storage/lmdb_db/lmdb_db.rs b/base_layer/core/src/chain_storage/lmdb_db/lmdb_db.rs index 4ebe7f7d9d..80232ec610 100644 --- a/base_layer/core/src/chain_storage/lmdb_db/lmdb_db.rs +++ b/base_layer/core/src/chain_storage/lmdb_db/lmdb_db.rs @@ -1401,7 +1401,7 @@ impl LMDBDatabase { let store = self.validator_node_store(txn); let constants = self.get_consensus_constants(header.height); let current_epoch = self.block_height_to_epoch(header.height); - // TODO: What if the validity period has changed? + // TODO: What if the validity period has changed?[https://github.com/tari-project/tari/issues/5798] let start_height = self.epoch_to_block_height(current_epoch.saturating_sub(constants.validator_node_validity_period_epochs())); let end_height = self.epoch_to_block_height(current_epoch); diff --git a/base_layer/core/src/consensus/consensus_manager.rs b/base_layer/core/src/consensus/consensus_manager.rs index e1d2c0ae04..39b99972ef 100644 --- a/base_layer/core/src/consensus/consensus_manager.rs +++ b/base_layer/core/src/consensus/consensus_manager.rs @@ -113,7 +113,7 @@ impl ConsensusManager { constants } - /// Returns the current epoch from the given height + /// Returns the current epoch number as calculated from the given height pub fn block_height_to_epoch(&self, height: u64) -> VnEpoch { let mut epoch = 0; let mut leftover_height = 0; @@ -135,7 +135,7 @@ impl ConsensusManager { VnEpoch(epoch) } - /// Returns the block height of the start of the given epoch + /// Returns the block height of the start of the given epoch number pub fn epoch_to_block_height(&self, epoch: VnEpoch) -> u64 { let mut cur_epoch = 0; let mut leftover_height = 0;