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 ddb7bc6861..94be38d03f 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 @@ -1376,7 +1376,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 9e8848ca51..50bb723b6f 100644 --- a/base_layer/core/src/consensus/consensus_manager.rs +++ b/base_layer/core/src/consensus/consensus_manager.rs @@ -111,7 +111,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; @@ -133,7 +133,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;