Electroneum
test_bulletproof< a_verify, n_amounts > Class Template Reference

#include <bulletproof.h>

Collaboration diagram for test_bulletproof< a_verify, n_amounts >:

Public Member Functions

bool init ()
 
bool test ()
 

Static Public Attributes

static const size_t approx_loop_count = 100 / n_amounts
 
static const size_t loop_count = (approx_loop_count >= 10 ? approx_loop_count : 10) / (a_verify ? 1 : 5)
 
static const bool verify = a_verify
 

Detailed Description

template<bool a_verify, size_t n_amounts>
class test_bulletproof< a_verify, n_amounts >

Definition at line 37 of file bulletproof.h.

Member Function Documentation

◆ init()

template<bool a_verify, size_t n_amounts>
bool test_bulletproof< a_verify, n_amounts >::init ( )
inline

Definition at line 44 of file bulletproof.h.

45  {
46  proof = rct::bulletproof_PROVE(std::vector<uint64_t>(n_amounts, 749327532984), rct::skvGen(n_amounts));
47  return true;
48  }
keyV skvGen(size_t rows)
Definition: rctOps.cpp:266
Bulletproof bulletproof_PROVE(const rct::key &v, const rct::key &gamma)
Here is the call graph for this function:

◆ test()

template<bool a_verify, size_t n_amounts>
bool test_bulletproof< a_verify, n_amounts >::test ( )
inline

Definition at line 50 of file bulletproof.h.

51  {
52  bool ret = true;
53  if (verify)
54  ret = rct::bulletproof_VERIFY(proof);
55  else
56  rct::bulletproof_PROVE(std::vector<uint64_t>(n_amounts, 749327532984), rct::skvGen(n_amounts));
57  return ret;
58  }
keyV skvGen(size_t rows)
Definition: rctOps.cpp:266
bool bulletproof_VERIFY(const Bulletproof &proof)
static const bool verify
Definition: bulletproof.h:42
Bulletproof bulletproof_PROVE(const rct::key &v, const rct::key &gamma)
Here is the call graph for this function:

Member Data Documentation

◆ approx_loop_count

template<bool a_verify, size_t n_amounts>
const size_t test_bulletproof< a_verify, n_amounts >::approx_loop_count = 100 / n_amounts
static

Definition at line 40 of file bulletproof.h.

◆ loop_count

template<bool a_verify, size_t n_amounts>
const size_t test_bulletproof< a_verify, n_amounts >::loop_count = (approx_loop_count >= 10 ? approx_loop_count : 10) / (a_verify ? 1 : 5)
static

Definition at line 41 of file bulletproof.h.

◆ verify

template<bool a_verify, size_t n_amounts>
const bool test_bulletproof< a_verify, n_amounts >::verify = a_verify
static

Definition at line 42 of file bulletproof.h.


The documentation for this class was generated from the following file: