Skip to content
This repository has been archived by the owner on Jun 25, 2021. It is now read-only.

Commit

Permalink
fix: enable relocation again
Browse files Browse the repository at this point in the history
- Low number used now for tests, consider increasing it.
  • Loading branch information
oetyng authored and joshuef committed Mar 22, 2021
1 parent fb77ed1 commit f9fde30
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ mod section;
/// More nodes might be added if requested by the upper layers.
/// This number also detemines when split happens - if both post-split sections would have at least
/// this number of nodes.
pub const RECOMMENDED_SECTION_SIZE: usize = 21;
pub const RECOMMENDED_SECTION_SIZE: usize = 3 * ELDER_SIZE;

/// Number of elders per section.
pub const ELDER_SIZE: usize = 7;
Expand Down
5 changes: 3 additions & 2 deletions src/routing/approved.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1450,8 +1450,9 @@ impl Approved {
return Ok(commands);
}

// TEMP: Do not carry out relocations (used to be disabled only in genesis section)
if self.section.prefix().bit_count() < u16::MAX as usize {
// Consider: Set <= 4, as to not carry out relocations in first 16 sections.
// TEMP: Do not carry out relocations in the first section
if self.section.prefix().bit_count() < 1 {
return Ok(commands);
}

Expand Down

0 comments on commit f9fde30

Please sign in to comment.