scipr-lab / libsnark

C++ library for zkSNARKs
Other
1.8k stars 570 forks source link

Invalid use of member function size_t libsnark::r1cs_constraint_system<FieldT>::num_variables() #173

Closed gargarchit closed 4 years ago

gargarchit commented 4 years ago

Invalid use of member function size_t libsnark::r1cs_constraint_system::num_variables()

Link of the code

Correct Code

template<typename FieldT>
void protoboard<FieldT>::dump_variables() const
{
#ifdef DEBUG
    for (size_t i = 0; i < constraint_system.num_variables(); ++i)
    {
        printf("%-40s --> ", constraint_system.variable_annotations[i].c_str());
        values[i].as_bigint().print_hex();
    }
#endif
}
ValarDragon commented 4 years ago

Thanks for pointing this out! I've merged a fix for this onto staging