remove whitespaces

This commit is contained in:
j-berman 2024-05-17 00:22:50 -07:00
parent e1c03f4d5a
commit 1ba876bcc2
2 changed files with 12 additions and 12 deletions

View File

@ -162,7 +162,7 @@ namespace fcmp
{
// Starting index in the leaf layer
std::size_t start_idx;
// Contiguous leaves in a tree that start at the start_idx
// Contiguous leaves in a tree that start at the start_idx
std::vector<LeafTuple> tuples;
};
@ -179,7 +179,7 @@ namespace fcmp
struct TreeExtension final
{
Leaves leaves;
std::vector<LayerExtension<C1>> c1_layer_extensions;
std::vector<LayerExtension<C1>> c1_layer_extensions;
std::vector<LayerExtension<C2>> c2_layer_extensions;
};
@ -313,7 +313,7 @@ namespace fcmp
bool parent_is_c1 = true;
// Since we started with c2, the number of c2 layers should be == c1_layers.size() || (c1_layers.size() + 1)
const std::size_t num_layers = c2_layers.size();
const std::size_t num_layers = c2_layers.size();
CHECK_AND_ASSERT_THROW_MES(num_layers == c1_layers.size() || num_layers == (c1_layers.size() + 1),
"unexpected number of curve layers");
@ -405,7 +405,7 @@ namespace fcmp
// There won't be any existing children when growing the leaf layer, fill priors with 0
std::vector<typename C::Scalar> prior_children;
extend_zeroes(curve, new_children.size(), prior_children);
extend_zeroes(curve, new_children.size(), prior_children);
return curve.hash_grow(
curve.GENERATORS,
@ -764,7 +764,7 @@ namespace fcmp
if (tree_inout.c2_layers.size() == c2_idx)
tree_inout.c2_layers.emplace_back(Layer<C2>{});
auto &c2_inout = tree_inout.c2_layers[c2_idx];
auto &c2_inout = tree_inout.c2_layers[c2_idx];
const bool started_after_tip = (c2_inout.size() == c2_ext.start_idx);
const bool started_at_tip = (c2_inout.size() == (c2_ext.start_idx + 1));
@ -790,7 +790,7 @@ namespace fcmp
if (tree_inout.c1_layers.size() == c1_idx)
tree_inout.c1_layers.emplace_back(Layer<C1>{});
auto &c1_inout = tree_inout.c1_layers[c1_idx];
auto &c1_inout = tree_inout.c1_layers[c1_idx];
const bool started_after_tip = (c1_inout.size() == c1_ext.start_idx);
const bool started_at_tip = (c1_inout.size() == (c1_ext.start_idx + 1));

View File

@ -84,7 +84,7 @@ static void log_tree_extension(const fcmp::TreeExtension<fcmp::Helios, fcmp::Sel
{
CHECK_AND_ASSERT_THROW_MES(c2_idx < c2_extensions.size(), "unexpected c2 layer");
const fcmp::LayerExtension<fcmp::Selene> &c2_layer = c2_extensions[c2_idx];
const fcmp::LayerExtension<fcmp::Selene> &c2_layer = c2_extensions[c2_idx];
MDEBUG("Selene tree extension start idx: " << c2_layer.start_idx);
for (std::size_t j = 0; j < c2_layer.hashes.size(); ++j)
@ -96,7 +96,7 @@ static void log_tree_extension(const fcmp::TreeExtension<fcmp::Helios, fcmp::Sel
{
CHECK_AND_ASSERT_THROW_MES(c1_idx < c1_extensions.size(), "unexpected c1 layer");
const fcmp::LayerExtension<fcmp::Helios> &c1_layer = c1_extensions[c1_idx];
const fcmp::LayerExtension<fcmp::Helios> &c1_layer = c1_extensions[c1_idx];
MDEBUG("Helios tree extension start idx: " << c1_layer.start_idx);
for (std::size_t j = 0; j < c1_layer.hashes.size(); ++j)
@ -134,7 +134,7 @@ static void log_tree(const fcmp::Tree<fcmp::Helios, fcmp::Selene> &tree)
{
CHECK_AND_ASSERT_THROW_MES(c2_idx < tree.c2_layers.size(), "unexpected c2 layer");
const fcmp::Layer<fcmp::Selene> &c2_layer = tree.c2_layers[c2_idx];
const fcmp::Layer<fcmp::Selene> &c2_layer = tree.c2_layers[c2_idx];
MDEBUG("Selene layer size: " << c2_layer.size() << " , tree layer: " << i);
for (std::size_t j = 0; j < c2_layer.size(); ++j)
@ -146,7 +146,7 @@ static void log_tree(const fcmp::Tree<fcmp::Helios, fcmp::Selene> &tree)
{
CHECK_AND_ASSERT_THROW_MES(c1_idx < tree.c1_layers.size(), "unexpected c1 layer");
const fcmp::Layer<fcmp::Helios> &c1_layer = tree.c1_layers[c1_idx];
const fcmp::Layer<fcmp::Helios> &c1_layer = tree.c1_layers[c1_idx];
MDEBUG("Helios layer size: " << c1_layer.size() << " , tree layer: " << i);
for (std::size_t j = 0; j < c1_layer.size(); ++j)
@ -248,7 +248,7 @@ TEST(fcmp_tree, grow_tree)
fcmp::extend_tree<fcmp::Helios, fcmp::Selene>(
tree_extension,
fcmp::HELIOS,
fcmp::SELENE,
fcmp::SELENE,
global_tree);
log_tree(global_tree);
@ -285,7 +285,7 @@ TEST(fcmp_tree, grow_tree)
fcmp::extend_tree<fcmp::Helios, fcmp::Selene>(
tree_extension,
fcmp::HELIOS,
fcmp::SELENE,
fcmp::SELENE,
global_tree);
log_tree(global_tree);