Electroneum
test_ge_tobytes Class Reference

#include <ge_tobytes.h>

Inheritance diagram for test_ge_tobytes:
Collaboration diagram for test_ge_tobytes:

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 38 of file ge_tobytes.h.

Member Typedef Documentation

◆ base_class

Definition at line 43 of file ge_tobytes.h.

Member Function Documentation

◆ init()

bool test_ge_tobytes::init ( )
inline

Definition at line 45 of file ge_tobytes.h.

46  {
47  using namespace cryptonote;
48 
49  if (!base_class::init())
50  return false;
51 
54 
55  m_alice.generate();
56 
57  std::vector<tx_destination_entry> destinations;
58  destinations.push_back(tx_destination_entry(1, m_alice.get_keys().m_account_address, false));
59 
60  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))
61  return false;
62 
63  const cryptonote::txin_to_key& txin = boost::get<cryptonote::txin_to_key>(m_tx.vin[0]);
64  if (ge_frombytes_vartime(&m_p3, (const unsigned char*) &txin.k_image) != 0)
65  return false;
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
int ge_frombytes_vartime(ge_p3 *, const unsigned char *)
std::vector< cryptonote::tx_source_entry > m_sources
Here is the call graph for this function:

◆ test()

bool test_ge_tobytes::test ( )
inline

Definition at line 70 of file ge_tobytes.h.

71  {
72  rct::key key;
73  ge_p3_tobytes(key.bytes, &m_p3);
74  return true;
75  }
const char * key
Definition: hmac_keccak.cpp:39
#define ge_p3_tobytes
Definition: ge.h:55

Member Data Documentation

◆ loop_count

const size_t test_ge_tobytes::loop_count = 10000
static

Definition at line 41 of file ge_tobytes.h.


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