BitShares-Core  7.0.2
BitShares blockchain node software and command-line wallet software
Public Member Functions | Protected Attributes | List of all members
graphene::protocol::precomputable_transaction Class Reference

#include <transaction.hpp>

Inheritance diagram for graphene::protocol::precomputable_transaction:
graphene::protocol::signed_transaction graphene::protocol::transaction graphene::protocol::processed_transaction

Public Member Functions

 precomputable_transaction ()
 
 precomputable_transaction (const signed_transaction &tx)
 
 precomputable_transaction (signed_transaction &&tx)
 
virtual ~precomputable_transaction ()=default
 
virtual const transaction_id_typeid () const override
 
virtual void validate () const override
 
virtual const flat_set< public_key_type > & get_signature_keys (const chain_id_type &chain_id) const override
 Extract public keys from signatures with given chain ID. More...
 
virtual uint64_t get_packed_size () const override
 
- Public Member Functions inherited from graphene::protocol::signed_transaction
 signed_transaction (const transaction &trx=transaction())
 
virtual ~signed_transaction ()=default
 
const signature_typesign (const private_key_type &key, const chain_id_type &chain_id)
 
signature_type sign (const private_key_type &key, const chain_id_type &chain_id) const
 
set< public_key_typeget_required_signatures (const chain_id_type &chain_id, const flat_set< public_key_type > &available_keys, const std::function< const authority *(account_id_type)> &get_active, const std::function< const authority *(account_id_type)> &get_owner, bool allow_non_immediate_owner, bool ignore_custom_operation_required_authorities, uint32_t max_recursion=GRAPHENE_MAX_SIG_CHECK_DEPTH) const
 
void verify_authority (const chain_id_type &chain_id, const std::function< const authority *(account_id_type)> &get_active, const std::function< const authority *(account_id_type)> &get_owner, const custom_authority_lookup &get_custom, bool allow_non_immediate_owner, bool ignore_custom_operation_required_auths, uint32_t max_recursion=GRAPHENE_MAX_SIG_CHECK_DEPTH) const
 
set< public_key_typeminimize_required_signatures (const chain_id_type &chain_id, const flat_set< public_key_type > &available_keys, const std::function< const authority *(account_id_type)> &get_active, const std::function< const authority *(account_id_type)> &get_owner, const custom_authority_lookup &get_custom, bool allow_non_immediate_owner, bool ignore_custom_operation_required_auths, uint32_t max_recursion=GRAPHENE_MAX_SIG_CHECK_DEPTH) const
 
void clear ()
 
void clear_signatures ()
 
- Public Member Functions inherited from graphene::protocol::transaction
virtual ~transaction ()=default
 
digest_type digest () const
 Calculate the digest for a transaction. More...
 
void set_expiration (fc::time_point_sec expiration_time)
 
void set_reference_block (const block_id_type &reference_block)
 
template<typename Visitor >
vector< typename Visitor::result_type > visit (Visitor &&visitor)
 visit all operations More...
 
template<typename Visitor >
vector< typename Visitor::result_type > visit (Visitor &&visitor) const
 
void get_required_authorities (flat_set< account_id_type > &active, flat_set< account_id_type > &owner, vector< authority > &other, bool ignore_custom_operation_required_auths) const
 

Protected Attributes

bool _validated = false
 
uint64_t _packed_size = 0
 
- Protected Attributes inherited from graphene::protocol::signed_transaction
flat_set< public_key_type_signees
 
- Protected Attributes inherited from graphene::protocol::transaction
transaction_id_type _tx_id_buffer
 

Additional Inherited Members

- Public Attributes inherited from graphene::protocol::signed_transaction
vector< signature_typesignatures
 
- Public Attributes inherited from graphene::protocol::transaction
uint16_t ref_block_num = 0
 
uint32_t ref_block_prefix = 0
 
fc::time_point_sec expiration
 
vector< operationoperations
 
extensions_type extensions
 
- Protected Member Functions inherited from graphene::protocol::transaction
digest_type sig_digest (const chain_id_type &chain_id) const
 

Detailed Description

This represents a signed transaction that will never have its operations, signatures etc. modified again, after initial creation. It is therefore safe to cache results from various calls.

Definition at line 233 of file transaction.hpp.

Constructor & Destructor Documentation

◆ precomputable_transaction() [1/3]

graphene::protocol::precomputable_transaction::precomputable_transaction ( )
inline

Definition at line 235 of file transaction.hpp.

◆ precomputable_transaction() [2/3]

graphene::protocol::precomputable_transaction::precomputable_transaction ( const signed_transaction tx)
inline

Definition at line 236 of file transaction.hpp.

◆ precomputable_transaction() [3/3]

graphene::protocol::precomputable_transaction::precomputable_transaction ( signed_transaction &&  tx)
inline

Definition at line 237 of file transaction.hpp.

◆ ~precomputable_transaction()

virtual graphene::protocol::precomputable_transaction::~precomputable_transaction ( )
virtualdefault

Member Function Documentation

◆ get_packed_size()

uint64_t graphene::protocol::precomputable_transaction::get_packed_size ( ) const
overridevirtual

Reimplemented from graphene::protocol::transaction.

Definition at line 448 of file transaction.cpp.

◆ get_signature_keys()

const flat_set< public_key_type > & graphene::protocol::precomputable_transaction::get_signature_keys ( const chain_id_type chain_id) const
overridevirtual

Extract public keys from signatures with given chain ID.

Parameters
chain_idA chain ID
Returns
Public keys
Note
If _signees is empty, E.G. when it's the first time calling this function for the signed transaction, public keys will be extracted with given chain ID, and be stored into the mutable _signees field, then _signees will be returned; otherwise, the chain_id parameter will be ignored, and _signees will be returned directly.

Reimplemented from graphene::protocol::signed_transaction.

Definition at line 455 of file transaction.cpp.

◆ id()

const transaction_id_type & graphene::protocol::precomputable_transaction::id ( ) const
overridevirtual

Reimplemented from graphene::protocol::transaction.

Definition at line 434 of file transaction.cpp.

◆ validate()

void graphene::protocol::precomputable_transaction::validate ( ) const
overridevirtual

Reimplemented from graphene::protocol::transaction.

Definition at line 441 of file transaction.cpp.

Member Data Documentation

◆ _packed_size

uint64_t graphene::protocol::precomputable_transaction::_packed_size = 0
mutableprotected

Definition at line 246 of file transaction.hpp.

◆ _validated

bool graphene::protocol::precomputable_transaction::_validated = false
mutableprotected

Definition at line 245 of file transaction.hpp.


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