Skip to content

Commit

Permalink
fix: apply some review feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
cryptonemo committed Jun 15, 2020
1 parent 0b60508 commit 470bb7f
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions storage-proofs/core/src/settings.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ pub struct Settings {
pub column_write_batch_size: u32,
pub use_gpu_tree_builder: bool,
pub max_gpu_tree_batch_size: u32,
pub oct_rows_to_discard: u32,
pub rows_to_discard: u32,
}

impl Default for Settings {
Expand All @@ -34,7 +34,7 @@ impl Default for Settings {
column_write_batch_size: 262_144,
use_gpu_tree_builder: false,
max_gpu_tree_batch_size: 700_000,
oct_rows_to_discard: 2,
rows_to_discard: 2,
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion storage-proofs/core/src/util.rs
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ pub fn default_rows_to_discard(leafs: usize, arity: usize) -> usize {

// This configurable setting is for a default oct-tree
// rows_to_discard value, which defaults to 2.
let rows_to_discard = settings::SETTINGS.lock().unwrap().oct_rows_to_discard as usize;
let rows_to_discard = settings::SETTINGS.lock().unwrap().rows_to_discard as usize;

// Discard at most 'constant value' rows (coded below,
// differing by arity) while respecting the max number that
Expand Down
2 changes: 1 addition & 1 deletion storage-proofs/porep/src/stacked/vanilla/proof.rs
Original file line number Diff line number Diff line change
Expand Up @@ -982,7 +982,7 @@ impl<'a, Tree: 'static + MerkleTreeTrait, G: 'static + Hasher> StackedDrg<'a, Tr
);

// A default 'rows_to_discard' value will be chosen for tree_r_last, unless the user overrides this value via the
// environment setting (FIL_PROOFS_OCT_ROWS_TO_DISCARD). If this value is specified, no checking is done on it and it may
// environment setting (FIL_PROOFS_ROWS_TO_DISCARD). If this value is specified, no checking is done on it and it may
// result in a broken configuration. Use with caution.
tree_r_last_config.rows_to_discard =
default_rows_to_discard(nodes_count, Tree::Arity::to_usize());
Expand Down

0 comments on commit 470bb7f

Please sign in to comment.