Electroneum
tools::error::tx_not_constructed Struct Reference

#include <wallet_errors.h>

Inheritance diagram for tools::error::tx_not_constructed:
Collaboration diagram for tools::error::tx_not_constructed:

Public Types

typedef std::vector< cryptonote::tx_source_entrysources_t
 
typedef std::vector< cryptonote::tx_destination_entrydestinations_t
 

Public Member Functions

 tx_not_constructed (std::string &&loc, sources_t const &sources, destinations_t const &destinations, uint64_t unlock_time, cryptonote::network_type nettype)
 
const sources_tsources () const
 
const destinations_tdestinations () const
 
uint64_t unlock_time () const
 
std::string to_string () const
 
- Public Member Functions inherited from tools::error::wallet_error_base< Base >
const std::string & location () const
 
std::string to_string () const
 

Additional Inherited Members

- Protected Member Functions inherited from tools::error::transfer_error
 transfer_error (std::string &&loc, const std::string &message)
 
- Protected Member Functions inherited from tools::error::wallet_error_base< Base >
 wallet_error_base (std::string &&loc, const std::string &message)
 

Detailed Description

Definition at line 585 of file wallet_errors.h.

Member Typedef Documentation

◆ destinations_t

◆ sources_t

Constructor & Destructor Documentation

◆ tx_not_constructed()

tools::error::tx_not_constructed::tx_not_constructed ( std::string &&  loc,
sources_t const &  sources,
destinations_t const &  destinations,
uint64_t  unlock_time,
cryptonote::network_type  nettype 
)
inlineexplicit

Definition at line 590 of file wallet_errors.h.

597  : transfer_error(std::move(loc), "transaction was not constructed")
598  , m_sources(sources)
599  , m_destinations(destinations)
600  , m_unlock_time(unlock_time)
601  , m_nettype(nettype)
602  {
603  }
const T & move(const T &t)
Definition: gtest-port.h:1317
transfer_error(std::string &&loc, const std::string &message)
const sources_t & sources() const
const destinations_t & destinations() const

Member Function Documentation

◆ destinations()

const destinations_t& tools::error::tx_not_constructed::destinations ( ) const
inline

Definition at line 606 of file wallet_errors.h.

606 { return m_destinations; }

◆ sources()

const sources_t& tools::error::tx_not_constructed::sources ( ) const
inline

Definition at line 605 of file wallet_errors.h.

605 { return m_sources; }

◆ to_string()

std::string tools::error::tx_not_constructed::to_string ( ) const
inline

Definition at line 609 of file wallet_errors.h.

610  {
611  std::ostringstream ss;
613  ss << "\nSources:";
614  for (size_t i = 0; i < m_sources.size(); ++i)
615  {
616  const cryptonote::tx_source_entry& src = m_sources[i];
617  ss << "\n source " << i << ":";
618  ss << "\n amount: " << cryptonote::print_etn(src.amount);
619  // It's not good, if logs will contain such much data
620  //ss << "\n real_output: " << src.real_output;
621  //ss << "\n real_output_in_tx_index: " << src.real_output_in_tx_index;
622  //ss << "\n real_out_tx_key: " << epee::string_tools::pod_to_hex(src.real_out_tx_key);
623  //ss << "\n outputs:";
624  //for (size_t j = 0; j < src.outputs.size(); ++j)
625  //{
626  // const cryptonote::tx_source_entry::output_entry& out = src.outputs[j];
627  // ss << "\n " << j << ": " << out.first << ", " << epee::string_tools::pod_to_hex(out.second);
628  //}
629  }
630 
631  ss << "\nDestinations:";
632  for (size_t i = 0; i < m_destinations.size(); ++i)
633  {
634  const cryptonote::tx_destination_entry& dst = m_destinations[i];
635  ss << "\n " << i << ": " << cryptonote::get_account_address_as_str(m_nettype, dst.is_subaddress, dst.addr) << " " <<
637  }
638 
639  ss << "\nunlock_time: " << m_unlock_time;
640 
641  return ss.str();
642  }
std::string get_account_address_as_str(network_type nettype, bool subaddress, account_public_address const &adr)
std::string print_etn(uint64_t amount, unsigned int decimal_point)
bool is_subaddress
uint64_t amount
account_public_address addr
uint64_t amount
std::string to_string() const
Here is the call graph for this function:

◆ unlock_time()

uint64_t tools::error::tx_not_constructed::unlock_time ( ) const
inline

Definition at line 607 of file wallet_errors.h.

607 { return m_unlock_time; }

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