Electroneum
gen_rct_tx_pre_rct_altered_extra Struct Reference

#include <rct.h>

Inheritance diagram for gen_rct_tx_pre_rct_altered_extra:
Collaboration diagram for gen_rct_tx_pre_rct_altered_extra:

Public Member Functions

bool generate (std::vector< test_event_entry > &events) const
 
- Public Member Functions inherited from gen_rct_tx_validation_base
 gen_rct_tx_validation_base ()
 
bool check_tx_verification_context (const cryptonote::tx_verification_context &tvc, bool tx_added, size_t event_idx, const cryptonote::transaction &)
 
bool check_block_verification_context (const cryptonote::block_verification_context &bvc, size_t event_idx, const cryptonote::block &)
 
bool mark_invalid_block (cryptonote::core &, size_t ev_index, const std::vector< test_event_entry > &)
 
bool mark_invalid_tx (cryptonote::core &, size_t ev_index, const std::vector< test_event_entry > &)
 
bool generate_with (std::vector< test_event_entry > &events, const int *out_idx, int mixin, uint64_t amount_paid, bool valid, const std::function< void(std::vector< cryptonote::tx_source_entry > &sources, std::vector< cryptonote::tx_destination_entry > &destinations)> &pre_tx, const std::function< void(cryptonote::transaction &tx)> &post_tx) const
 
- Public Member Functions inherited from test_chain_unit_base
void register_callback (const std::string &cb_name, verify_callback cb)
 
bool verify (const std::string &cb_name, cryptonote::core &c, size_t ev_index, const std::vector< test_event_entry > &events)
 
bool check_block_verification_context (const cryptonote::block_verification_context &bvc, size_t event_idx, const cryptonote::block &)
 
bool check_tx_verification_context (const cryptonote::tx_verification_context &tvc, bool, size_t, const cryptonote::transaction &)
 
bool check_tx_verification_context_array (const std::vector< cryptonote::tx_verification_context > &tvcs, size_t, size_t, const std::vector< cryptonote::transaction > &)
 

Additional Inherited Members

- Public Types inherited from test_chain_unit_base
typedef boost::function< bool(cryptonote::core &c, size_t ev_index, const std::vector< test_event_entry > &events)> verify_callback
 
typedef std::map< std::string, verify_callbackcallbacks_map
 

Detailed Description

Definition at line 254 of file rct.h.

Member Function Documentation

◆ generate()

bool gen_rct_tx_pre_rct_altered_extra::generate ( std::vector< test_event_entry > &  events) const

Definition at line 491 of file rct.cpp.

492 {
493  const int mixin = 2;
494  const int out_idx[] = {0, -1};
495  const uint64_t amount_paid = 10000;
496  bool failed = false;
497  return generate_with(events, out_idx, mixin, amount_paid, false,
498  NULL, [&failed](transaction &tx) {std::string extra_nonce; crypto::hash pid = crypto::null_hash; set_payment_id_to_tx_extra_nonce(extra_nonce, pid); if (!add_extra_nonce_to_tx_extra(tx.extra, extra_nonce)) failed = true; }) && !failed;
499 }
::std::string string
Definition: gtest-port.h:1097
std::vector< uint8_t > extra
unsigned __int64 uint64_t
Definition: stdint.h:136
bool generate_with(std::vector< test_event_entry > &events, const int *out_idx, int mixin, uint64_t amount_paid, bool valid, const std::function< void(std::vector< cryptonote::tx_source_entry > &sources, std::vector< cryptonote::tx_destination_entry > &destinations)> &pre_tx, const std::function< void(cryptonote::transaction &tx)> &post_tx) const
Definition: rct.cpp:44
bool add_extra_nonce_to_tx_extra(std::vector< uint8_t > &tx_extra, const blobdata &extra_nonce)
POD_CLASS hash
Definition: hash.h:50
void set_payment_id_to_tx_extra_nonce(blobdata &extra_nonce, const crypto::hash &payment_id)
Here is the call graph for this function:

The documentation for this struct was generated from the following files: