Electroneum
Loading...
Searching...
No Matches
test_check_tx_signature< a_ring_size, a_outputs, a_rct, range_proof_type, bp_version > Class Template Reference

#include <check_tx_signature.h>

Inheritance diagram for test_check_tx_signature< a_ring_size, a_outputs, a_rct, range_proof_type, bp_version >:
Collaboration diagram for test_check_tx_signature< a_ring_size, a_outputs, a_rct, range_proof_type, bp_version >:

Public Types

typedef multi_tx_test_base< a_ring_size > base_class

Public Member Functions

bool init ()
bool test ()

Static Public Attributes

static const size_t loop_count = a_rct ? (a_ring_size <= 2 ? 50 : 10) : a_ring_size < 100 ? 100 : 10
static const size_t ring_size = a_ring_size
static const size_t outputs = a_outputs
static const bool rct = a_rct

Detailed Description

template<size_t a_ring_size, size_t a_outputs, bool a_rct, rct::RangeProofType range_proof_type = rct::RangeProofBorromean, int bp_version = 2>
class test_check_tx_signature< a_ring_size, a_outputs, a_rct, range_proof_type, bp_version >

Definition at line 45 of file check_tx_signature.h.

Member Typedef Documentation

◆ base_class

template<size_t a_ring_size, size_t a_outputs, bool a_rct, rct::RangeProofType range_proof_type = rct::RangeProofBorromean, int bp_version = 2>
typedef multi_tx_test_base<a_ring_size> test_check_tx_signature< a_ring_size, a_outputs, a_rct, range_proof_type, bp_version >::base_class

Definition at line 55 of file check_tx_signature.h.

Member Function Documentation

◆ init()

template<size_t a_ring_size, size_t a_outputs, bool a_rct, rct::RangeProofType range_proof_type = rct::RangeProofBorromean, int bp_version = 2>
bool test_check_tx_signature< a_ring_size, a_outputs, a_rct, range_proof_type, bp_version >::init ( )
inline

Definition at line 57 of file check_tx_signature.h.

58 {
59 using namespace cryptonote;
60
61 if (!base_class::init())
62 return false;
63
64 m_alice.generate();
65
67 destinations.push_back(tx_destination_entry(this->m_source_amount - outputs + 1, m_alice.get_keys().m_account_address, false));
68 for (size_t n = 1; n < outputs; ++n)
69 destinations.push_back(tx_destination_entry(1, m_alice.get_keys().m_account_address, false));
70
74 subaddresses[this->m_miners[this->real_source_idx].get_keys().m_account_address.m_spend_public_key] = {0,0};
77 return false;
78
79 get_transaction_prefix_hash(m_tx, m_tx_prefix_hash);
80
81 return true;
82 }
std::vector< cryptonote::tx_source_entry > m_sources
cryptonote::account_base m_miners[ring_size]
static const size_t real_source_idx
static const size_t outputs
Here is the call graph for this function:

◆ test()

template<size_t a_ring_size, size_t a_outputs, bool a_rct, rct::RangeProofType range_proof_type = rct::RangeProofBorromean, int bp_version = 2>
bool test_check_tx_signature< a_ring_size, a_outputs, a_rct, range_proof_type, bp_version >::test ( )
inline

Definition at line 84 of file check_tx_signature.h.

85 {
86 if (rct)
87 {
88 if (m_tx.rct_signatures.type == rct::RCTTypeFull)
89 return rct::verRct(m_tx.rct_signatures);
90 else
91 return rct::verRctSimple(m_tx.rct_signatures);
92 }
93 else
94 {
96 return crypto::check_ring_signature(m_tx_prefix_hash, txin.k_image, this->m_public_key_ptrs, ring_size, m_tx.signatures[0].data());
97 }
98 }
static const size_t ring_size
bool check_ring_signature(const hash &prefix_hash, const key_image &image, const public_key *const *pubs, std::size_t pubs_count, const signature *sig)
Definition crypto.h:333
bool verRct(const rctSig &rv, bool semantics)
Definition rctSigs.cpp:913
Here is the call graph for this function:

Member Data Documentation

◆ loop_count

template<size_t a_ring_size, size_t a_outputs, bool a_rct, rct::RangeProofType range_proof_type = rct::RangeProofBorromean, int bp_version = 2>
const size_t test_check_tx_signature< a_ring_size, a_outputs, a_rct, range_proof_type, bp_version >::loop_count = a_rct ? (a_ring_size <= 2 ? 50 : 10) : a_ring_size < 100 ? 100 : 10
static

Definition at line 50 of file check_tx_signature.h.

◆ outputs

template<size_t a_ring_size, size_t a_outputs, bool a_rct, rct::RangeProofType range_proof_type = rct::RangeProofBorromean, int bp_version = 2>
const size_t test_check_tx_signature< a_ring_size, a_outputs, a_rct, range_proof_type, bp_version >::outputs = a_outputs
static

Definition at line 52 of file check_tx_signature.h.

◆ rct

template<size_t a_ring_size, size_t a_outputs, bool a_rct, rct::RangeProofType range_proof_type = rct::RangeProofBorromean, int bp_version = 2>
const bool test_check_tx_signature< a_ring_size, a_outputs, a_rct, range_proof_type, bp_version >::rct = a_rct
static

Definition at line 53 of file check_tx_signature.h.

◆ ring_size

template<size_t a_ring_size, size_t a_outputs, bool a_rct, rct::RangeProofType range_proof_type = rct::RangeProofBorromean, int bp_version = 2>
const size_t test_check_tx_signature< a_ring_size, a_outputs, a_rct, range_proof_type, bp_version >::ring_size = a_ring_size
static

Definition at line 51 of file check_tx_signature.h.


The documentation for this class was generated from the following file:
  • /home/abuild/rpmbuild/BUILD/electroneum-5.1.3.1-build/electroneum-5.1.3.1/tests/performance_tests/check_tx_signature.h