Wire Sysio
Wire Sysion 1.0.0
Loading...
Searching...
No Matches
plugin_interface.hpp
Go to the documentation of this file.
1
#pragma once
2
3
#include <
appbase/channel.hpp
>
4
#include <
appbase/method.hpp
>
5
6
#include <
sysio/chain/block.hpp
>
7
#include <
sysio/chain/block_state.hpp
>
8
#include <
sysio/chain/transaction_metadata.hpp
>
9
#include <
sysio/chain/trace.hpp
>
10
11
namespace
sysio
{
namespace
chain {
namespace
plugin_interface {
12
using namespace
sysio::chain
;
13
using namespace
appbase
;
14
15
template
<
typename
T>
16
using
next_function
= std::function<void(
const
std::variant<fc::exception_ptr, T>&)>;
17
18
struct
chain_plugin_interface;
19
20
namespace
channels {
21
using
pre_accepted_block
=
channel_decl<struct pre_accepted_block_tag, signed_block_ptr>
;
22
using
rejected_block
=
channel_decl<struct rejected_block_tag, signed_block_ptr>
;
23
using
accepted_block_header
=
channel_decl<struct accepted_block_header_tag, block_state_ptr>
;
24
using
accepted_block
=
channel_decl<struct accepted_block_tag, block_state_ptr>
;
25
using
irreversible_block
=
channel_decl<struct irreversible_block_tag, block_state_ptr>
;
26
using
accepted_transaction
=
channel_decl<struct accepted_transaction_tag, transaction_metadata_ptr>
;
27
using
applied_transaction
=
channel_decl<struct applied_transaction_tag, transaction_trace_ptr>
;
28
}
29
30
namespace
methods {
31
using
get_block_by_number
=
method_decl
<chain_plugin_interface,
signed_block_ptr
(
uint32_t
block_num)>;
32
using
get_block_by_id
=
method_decl
<chain_plugin_interface,
signed_block_ptr
(
const
block_id_type
& block_id)>;
33
using
get_head_block_id
=
method_decl
<chain_plugin_interface,
block_id_type
()>;
34
using
get_lib_block_id
=
method_decl
<chain_plugin_interface,
block_id_type
()>;
35
36
using
get_last_irreversible_block_number
=
method_decl
<chain_plugin_interface,
uint32_t
()>;
37
}
38
39
namespace
incoming
{
40
namespace
methods {
41
// synchronously push a block/trx to a single provider, block_state_ptr may be null
42
using
block_sync
=
method_decl
<chain_plugin_interface, bool(
const
signed_block_ptr
&,
const
std::optional<block_id_type>&,
const
block_state_ptr
&),
first_provider_policy
>;
43
using
transaction_async
=
method_decl
<chain_plugin_interface, void(
const
packed_transaction_ptr
&,
bool
,
bool
,
bool
,
next_function<transaction_trace_ptr>
),
first_provider_policy
>;
44
}
45
}
46
47
namespace
compat {
48
namespace
channels {
49
using
transaction_ack
=
channel_decl<struct accepted_transaction_tag, std::pair<fc::exception_ptr, packed_transaction_ptr>
>;
50
}
51
}
52
53
} } }
block.hpp
block_state.hpp
channel.hpp
fc::sha256
Definition
sha256.hpp:12
trace.hpp
method.hpp
appbase
Definition
application.cpp:18
sysio::chain::plugin_interface::next_function
std::function< void(const std::variant< fc::exception_ptr, T > &)> next_function
Definition
plugin_interface.hpp:16
sysio::chain
Definition
abi_serializer.cpp:8
sysio::chain::block_id_type
fc::sha256 block_id_type
Definition
types.hpp:231
sysio::chain::packed_transaction_ptr
std::shared_ptr< const packed_transaction > packed_transaction_ptr
Definition
transaction.hpp:214
sysio::chain::signed_block_ptr
std::shared_ptr< signed_block > signed_block_ptr
Definition
block.hpp:105
sysio::chain::block_state_ptr
std::shared_ptr< block_state > block_state_ptr
Definition
block_state.hpp:67
sysio::chain::trx_enum_type::incoming
@ incoming
sysio
Definition
abi_serializer.cpp:8
uint32_t
unsigned int uint32_t
Definition
stdint.h:126
appbase::channel_decl
Definition
channel.hpp:183
appbase::first_provider_policy
Definition
method.hpp:97
appbase::method_decl
Definition
method.hpp:301
transaction_metadata.hpp
plugins
chain_interface
include
sysio
chain
plugin_interface.hpp
Generated by
1.12.0