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
5
6namespace sysio::chain_apis {
7
8template<typename T>
9using next_function = std::function<void(const std::variant<fc::exception_ptr, T>&)>;
10
20public:
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,
34
37
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
61
65 void on_block_start( uint32_t block_num );
66
70 void on_accepted_block(const chain::block_state_ptr& block );
71
76
77private:
78 std::unique_ptr<struct trx_retry_db_impl> _impl;
79};
80
81} // namespace sysio::chain_apis
void on_applied_transaction(const chain::transaction_trace_ptr &trace, const chain::packed_transaction_ptr &ptrx)
trx_retry_db(trx_retry_db &&)=delete
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)
trx_retry_db & operator=(trx_retry_db &&)=delete
fc::time_point_sec get_max_expiration_time() const
void on_irreversible_block(const chain::block_state_ptr &block)
void track_transaction(chain::packed_transaction_ptr ptrx, std::optional< uint16_t > num_blocks, next_function< std::unique_ptr< fc::variant > > next)
void on_accepted_block(const chain::block_state_ptr &block)
void on_block_start(uint32_t block_num)
std::function< void(const std::variant< fc::exception_ptr, T > &)> next_function
std::shared_ptr< transaction_trace > transaction_trace_ptr
Definition trace.hpp:20
std::shared_ptr< const packed_transaction > packed_transaction_ptr
std::shared_ptr< block_state > block_state_ptr
const fc::microseconds abi_serializer_max_time
Definition main.cpp:173
unsigned int uint32_t
Definition stdint.h:126