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
10
11namespace 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
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>;
44 }
45 }
46
52
53} } }
std::function< void(const std::variant< fc::exception_ptr, T > &)> next_function
fc::sha256 block_id_type
Definition types.hpp:231
std::shared_ptr< const packed_transaction > packed_transaction_ptr
std::shared_ptr< signed_block > signed_block_ptr
Definition block.hpp:105
std::shared_ptr< block_state > block_state_ptr
unsigned int uint32_t
Definition stdint.h:126