Wire Sysio
Wire Sysion 1.0.0
Loading...
Searching...
No Matches
trx_retry_db.hpp
Go to the documentation of this file.
1
#pragma once
2
#include <
sysio/chain/types.hpp
>
3
#include <
sysio/chain/block_state.hpp
>
4
#include <
sysio/chain/trace.hpp
>
5
6
namespace
sysio::chain_apis
{
7
8
template
<
typename
T>
9
using
next_function
= std::function<void(
const
std::variant<fc::exception_ptr, T>&)>;
10
19
class
trx_retry_db
{
20
public
:
21
30
explicit
trx_retry_db
(
const
chain::controller
&
controller
,
size_t
max_mem_usage_size,
31
fc::microseconds
retry_interval,
fc::microseconds
max_expiration_time,
32
fc::microseconds
abi_serializer_max_time
);
33
~trx_retry_db
();
34
35
trx_retry_db
(
trx_retry_db
&&) =
delete
;
36
trx_retry_db
&
operator=
(
trx_retry_db
&&) =
delete
;
37
41
fc::time_point_sec
get_max_expiration_time
()
const
;
42
46
size_t
size
()
const
;
47
54
void
track_transaction
(
chain::packed_transaction_ptr
ptrx, std::optional<uint16_t> num_blocks,
next_function
<std::unique_ptr<fc::variant>> next );
55
60
void
on_applied_transaction
(
const
chain::transaction_trace_ptr
& trace,
const
chain::packed_transaction_ptr
& ptrx );
61
65
void
on_block_start
(
uint32_t
block_num );
66
70
void
on_accepted_block
(
const
chain::block_state_ptr
& block );
71
75
void
on_irreversible_block
(
const
chain::block_state_ptr
& block );
76
77
private
:
78
std::unique_ptr<struct trx_retry_db_impl> _impl;
79
};
80
81
}
// namespace sysio::chain_apis
block_state.hpp
types.hpp
fc::microseconds
Definition
time.hpp:11
fc::time_point_sec
Definition
time.hpp:73
sysio::chain::controller
Definition
controller.hpp:63
sysio::chain_apis::trx_retry_db
Definition
trx_retry_db.hpp:19
sysio::chain_apis::trx_retry_db::~trx_retry_db
~trx_retry_db()
sysio::chain_apis::trx_retry_db::on_applied_transaction
void on_applied_transaction(const chain::transaction_trace_ptr &trace, const chain::packed_transaction_ptr &ptrx)
Definition
trx_retry_db.cpp:314
sysio::chain_apis::trx_retry_db::trx_retry_db
trx_retry_db(trx_retry_db &&)=delete
sysio::chain_apis::trx_retry_db::trx_retry_db
trx_retry_db(const chain::controller &controller, size_t max_mem_usage_size, fc::microseconds retry_interval, fc::microseconds max_expiration_time, fc::microseconds abi_serializer_max_time)
Definition
trx_retry_db.cpp:292
sysio::chain_apis::trx_retry_db::operator=
trx_retry_db & operator=(trx_retry_db &&)=delete
sysio::chain_apis::trx_retry_db::get_max_expiration_time
fc::time_point_sec get_max_expiration_time() const
Definition
trx_retry_db.cpp:305
sysio::chain_apis::trx_retry_db::on_irreversible_block
void on_irreversible_block(const chain::block_state_ptr &block)
Definition
trx_retry_db.cpp:332
sysio::chain_apis::trx_retry_db::track_transaction
void track_transaction(chain::packed_transaction_ptr ptrx, std::optional< uint16_t > num_blocks, next_function< std::unique_ptr< fc::variant > > next)
Definition
trx_retry_db.cpp:301
sysio::chain_apis::trx_retry_db::on_accepted_block
void on_accepted_block(const chain::block_state_ptr &block)
Definition
trx_retry_db.cpp:326
sysio::chain_apis::trx_retry_db::on_block_start
void on_block_start(uint32_t block_num)
Definition
trx_retry_db.cpp:320
sysio::chain_apis::trx_retry_db::size
size_t size() const
Definition
trx_retry_db.cpp:310
trace.hpp
sysio::chain_apis
Definition
chain_id_type.hpp:10
sysio::chain_apis::next_function
std::function< void(const std::variant< fc::exception_ptr, T > &)> next_function
Definition
trx_retry_db.hpp:9
sysio::chain::transaction_trace_ptr
std::shared_ptr< transaction_trace > transaction_trace_ptr
Definition
trace.hpp:20
sysio::chain::packed_transaction_ptr
std::shared_ptr< const packed_transaction > packed_transaction_ptr
Definition
transaction.hpp:214
sysio::chain::block_state_ptr
std::shared_ptr< block_state > block_state_ptr
Definition
block_state.hpp:67
abi_serializer_max_time
const fc::microseconds abi_serializer_max_time
Definition
main.cpp:173
uint32_t
unsigned int uint32_t
Definition
stdint.h:126
plugins
chain_plugin
include
sysio
chain_plugin
trx_retry_db.hpp
Generated by
1.12.0