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 586 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 591 of file wallet_errors.h.

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

Member Function Documentation

◆ destinations()

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

Definition at line 607 of file wallet_errors.h.

607 { return m_destinations; }

◆ sources()

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

Definition at line 606 of file wallet_errors.h.

606 { return m_sources; }
Here is the caller graph for this function:

◆ to_string()

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

Definition at line 610 of file wallet_errors.h.

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

◆ unlock_time()

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

Definition at line 608 of file wallet_errors.h.

608 { return m_unlock_time; }

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