tx_pool
//! pair of <transaction fee, transaction hash> for organization
typedef std::pair<std::pair<double, std::time_t>, crypto::hash> tx_by_fee_and_receive_time_entry; //! container for sorting transactions by fee per unit size
typedef std::set<tx_by_fee_and_receive_time_entry, txCompare> sorted_tx_container; /**
* @brief information about a single transaction
*/
struct tx_details
{
transaction tx; //!< the transaction
size_t blob_size; //!< the transaction's size
uint64_t fee; //!< the transaction's fee amount
crypto::hash max_used_block_id; //!< the hash of the highest block referenced by an input
uint64_t max_used_block_height; //!< the height of the highest block referenced by an input
//! whether or not the transaction has been in a block before
/*! if the transaction was returned to the pool from the blockchain
* due to a reorg, then this will be true
*/
bool kept_by_block;
//! the highest block the transaction referenced when last checking it failed
/*! if verifying a transaction's inputs fails, it's possible this is due
* to a reorg since it was created (if it used recently created outputs
* as inputs).
*/
uint64_t last_failed_height;
//! the hash of the highest block the transaction referenced when last checking it failed
/*! if verifying a transaction's inputs fails, it's possible this is due
* to a reorg since it was created (if it used recently created outputs
* as inputs).
*/
crypto::hash last_failed_id;
time_t receive_time; //!< the time when the transaction entered the pool
time_t last_relayed_time; //!< the last time the transaction was relayed to the network
bool relayed; //!< whether or not the transaction has been relayed to the network
bool do_not_relay; //!< to avoid relay this transaction to the network
bool double_spend_seen; //!< true iff another tx was seen double spending this one
};Last updated
Was this helpful?