Skip to content

Commit

Permalink
minor and epoch_length = 1200
Browse files Browse the repository at this point in the history
  • Loading branch information
ppca committed Mar 23, 2023
1 parent e23c39a commit 4ebf500
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
2 changes: 1 addition & 1 deletion chain/chain/src/store.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1984,7 +1984,7 @@ impl<'a> ChainStoreUpdate<'a> {
for _header_hash in header_hashes {
// 3. Delete header_hash-indexed data
// TODO #3488: enable
self.gc_col(DBCol::BlockHeader, _header_hash.as_bytes());
// self.gc_col(DBCol::BlockHeader, _header_hash.as_bytes());
}

// 4. Delete chunks_tail-related data
Expand Down
2 changes: 1 addition & 1 deletion nearcore/src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ pub const CHUNK_PRODUCER_KICKOUT_THRESHOLD: u8 = 90;
/// Fast mode constants for testing/developing.
pub const FAST_MIN_BLOCK_PRODUCTION_DELAY: u64 = 120;
pub const FAST_MAX_BLOCK_PRODUCTION_DELAY: u64 = 500;
pub const FAST_EPOCH_LENGTH: BlockHeightDelta = 60;
pub const FAST_EPOCH_LENGTH: BlockHeightDelta = 1200;

/// Expected number of blocks per year
pub const NUM_BLOCKS_PER_YEAR: u64 = 365 * 24 * 60 * 60;
Expand Down
5 changes: 5 additions & 0 deletions tools/reset-head/src/cli.rs
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,11 @@ impl ResetHeadToPrevCommand {

// chain_store_update.dec_block_refcount(&prev_hash)?;

// stop if it's already the final block
if current_final_head.height >= prev_tip.height {
return Err(anyhow::anyhow!("cannot revert past final block"))
}

// clear block data for current head
chain_store_update.clear_block_data_head_reset(head_hash)?;

Expand Down

0 comments on commit 4ebf500

Please sign in to comment.