Electroneum
test_ge_frombytes_vartime Class Reference

#include <ge_frombytes_vartime.h>

Inheritance diagram for test_ge_frombytes_vartime:
Collaboration diagram for test_ge_frombytes_vartime:

Public Types

typedef multi_tx_test_base< 1 > base_class
 

Public Member Functions

bool init ()
 
bool test ()
 
- Public Member Functions inherited from multi_tx_test_base< 1 >
bool init ()
 

Static Public Attributes

static const size_t loop_count = 10000
 
- Static Public Attributes inherited from multi_tx_test_base< 1 >
static const size_t ring_size
 
static const size_t real_source_idx
 

Additional Inherited Members

- Protected Attributes inherited from multi_tx_test_base< 1 >
cryptonote::account_base m_miners [ring_size]
 
cryptonote::transaction m_miner_txs [ring_size]
 
uint64_t m_source_amount
 
std::vector< cryptonote::tx_source_entrym_sources
 
crypto::public_key m_public_keys [ring_size]
 
const crypto::public_keym_public_key_ptrs [ring_size]
 

Detailed Description

Definition at line 39 of file ge_frombytes_vartime.h.

Member Typedef Documentation

◆ base_class

Member Function Documentation

◆ init()

bool test_ge_frombytes_vartime::init ( )
inline

Definition at line 46 of file ge_frombytes_vartime.h.

47  {
48  using namespace cryptonote;
49 
50  if (!base_class::init())
51  return false;
52 
55 
56  m_alice.generate();
57 
58  std::vector<tx_destination_entry> destinations;
59  destinations.push_back(tx_destination_entry(1, m_alice.get_keys().m_account_address, false));
60 
61  if (!construct_tx(this->m_miners[this->real_source_idx].get_keys(), this->m_sources, destinations, boost::none, std::vector<uint8_t>(), m_tx, 0))
62  return false;
63 
64  const cryptonote::txin_to_key& txin = boost::get<cryptonote::txin_to_key>(m_tx.vin[0]);
65  m_key = rct::ki2rct(txin.k_image);
66 
67  return true;
68  }
cryptonote::account_base m_miners[ring_size]
static const size_t real_source_idx
bool construct_tx(const account_keys &sender_account_keys, std::vector< tx_source_entry > &sources, const std::vector< tx_destination_entry > &destinations, const boost::optional< cryptonote::account_public_address > &change_addr, const std::vector< uint8_t > &extra, transaction &tx, uint64_t unlock_time)
crypto::secret_key generate(const crypto::secret_key &recovery_key=crypto::secret_key(), bool recover=false, bool two_random=false)
Definition: account.cpp:158
const account_keys & get_keys() const
Definition: account.cpp:264
Holds cryptonote related classes and helpers.
Definition: ban.cpp:40
account_public_address m_account_address
Definition: account.h:43
crypto::key_image k_image
std::vector< cryptonote::tx_source_entry > m_sources
Here is the call graph for this function:

◆ test()

bool test_ge_frombytes_vartime::test ( )
inline

Definition at line 70 of file ge_frombytes_vartime.h.

71  {
72  ge_p3 unp;
73  return ge_frombytes_vartime(&unp, (const unsigned char*) &m_key) == 0;
74  }
int ge_frombytes_vartime(ge_p3 *, const unsigned char *)
Here is the call graph for this function:

Member Data Documentation

◆ loop_count

const size_t test_ge_frombytes_vartime::loop_count = 10000
static

Definition at line 42 of file ge_frombytes_vartime.h.


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