Electroneum
tools::error::tx_too_big Struct Reference

#include <wallet_errors.h>

Inheritance diagram for tools::error::tx_too_big:
Collaboration diagram for tools::error::tx_too_big:

Public Member Functions

 tx_too_big (std::string &&loc, const cryptonote::transaction &tx, uint64_t tx_weight_limit)
 
 tx_too_big (std::string &&loc, uint64_t tx_weight, uint64_t tx_weight_limit)
 
bool tx_valid () const
 
const cryptonote::transactiontx () const
 
uint64_t tx_weight () const
 
uint64_t tx_weight_limit () 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 722 of file wallet_errors.h.

Constructor & Destructor Documentation

◆ tx_too_big() [1/2]

tools::error::tx_too_big::tx_too_big ( std::string &&  loc,
const cryptonote::transaction tx,
uint64_t  tx_weight_limit 
)
inlineexplicit

Definition at line 724 of file wallet_errors.h.

725  : transfer_error(std::move(loc), "transaction is too big")
726  , m_tx(tx)
727  , m_tx_valid(true)
728  , m_tx_weight(cryptonote::get_transaction_weight(tx))
729  , m_tx_weight_limit(tx_weight_limit)
730  {
731  }
uint64_t tx_weight_limit() const
transfer_error(std::string &&loc, const std::string &message)
uint64_t get_transaction_weight(const transaction &tx, size_t blob_size)
const cryptonote::transaction & tx() const
const T & move(const T &t)
Definition: gtest-port.h:1317

◆ tx_too_big() [2/2]

tools::error::tx_too_big::tx_too_big ( std::string &&  loc,
uint64_t  tx_weight,
uint64_t  tx_weight_limit 
)
inlineexplicit

Definition at line 733 of file wallet_errors.h.

734  : transfer_error(std::move(loc), "transaction would be too big")
735  , m_tx_valid(false)
736  , m_tx_weight(tx_weight)
737  , m_tx_weight_limit(tx_weight_limit)
738  {
739  }
uint64_t tx_weight() const
uint64_t tx_weight_limit() const
transfer_error(std::string &&loc, const std::string &message)
const T & move(const T &t)
Definition: gtest-port.h:1317

Member Function Documentation

◆ to_string()

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

Definition at line 746 of file wallet_errors.h.

747  {
748  std::ostringstream ss;
749  ss << transfer_error::to_string() <<
750  ", tx_weight_limit = " << m_tx_weight_limit <<
751  ", tx weight = " << m_tx_weight;
752  if (m_tx_valid)
753  {
755  ss << ", tx:\n" << cryptonote::obj_to_json_str(tx);
756  }
757  return ss.str();
758  }
std::string to_string() const
const cryptonote::transaction & tx() const
std::string obj_to_json_str(T &obj)
Here is the call graph for this function:

◆ tx()

const cryptonote::transaction& tools::error::tx_too_big::tx ( ) const
inline

Definition at line 742 of file wallet_errors.h.

742 { return m_tx; }
Here is the caller graph for this function:

◆ tx_valid()

bool tools::error::tx_too_big::tx_valid ( ) const
inline

Definition at line 741 of file wallet_errors.h.

741 { return m_tx_valid; }

◆ tx_weight()

uint64_t tools::error::tx_too_big::tx_weight ( ) const
inline

Definition at line 743 of file wallet_errors.h.

743 { return m_tx_weight; }

◆ tx_weight_limit()

uint64_t tools::error::tx_too_big::tx_weight_limit ( ) const
inline

Definition at line 744 of file wallet_errors.h.

744 { return m_tx_weight_limit; }

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