Skip to content

Commit

Permalink
add check for ivalid var type
Browse files Browse the repository at this point in the history
  • Loading branch information
CblPOK-git authored and akokoshn committed May 3, 2024
1 parent 70c07e1 commit 7b2fe53
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,8 @@ namespace nil {
case VariableType::column_type::selector:
assignment = assignments.selector(var.index);
break;
default:
BOOST_ASSERT_MSG(false, "Invalid column type");
}

if (var.rotation != 0) {
Expand Down Expand Up @@ -169,6 +171,8 @@ namespace nil {
case VariableType::column_type::selector:
assignment = assignments.selector(var.index);
break;
default:
BOOST_ASSERT_MSG(false, "Invalid column type");
}

if (var.rotation != 0) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,10 @@ namespace nil {
return witness_columns + public_input_columns + a.index;
case plonk_variable<typename FieldType::value_type>::column_type::selector:
return witness_columns + public_input_columns + constant_columns + a.index;
default:
std::cerr << "Invalid column type";
std::abort();
break;
}
/* unreachable*/
return std::numeric_limits<size_t>::max();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,10 @@ namespace nil {
case polynomial_dfs_variable_type::column_type::selector:
assignment = assignments.selector(var.index);
break;
default:
std::cerr << "Invalid column type";
std::abort();
break;
}

if (var.rotation != 0) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -462,6 +462,10 @@ namespace nil {
case DfsVariableType::column_type::selector:
assignment = assignments.selector(var.index);
break;
default:
std::cerr << "Invalid column type";
std::abort();
break;
}

if (var.rotation != 0) {
Expand Down

0 comments on commit 7b2fe53

Please sign in to comment.