Wire Sysio Wire Sysion 1.0.0
Loading...
Searching...
No Matches
system_contracts::testing::test_contracts::blockinfo_tester Namespace Reference

Classes

struct  get_latest_block_batch_info
 Input data structure for get_latest_block_batch_info RPC. More...
 
struct  latest_block_batch_info_result
 Output data structure for get_latest_block_batch_info RPC. More...
 

Typedefs

using time_point = sysio::time_point
 
using varint = sysio::unsigned_int
 
using input_type = std::variant<get_latest_block_batch_info>
 
using output_type = std::variant<latest_block_batch_info_result>
 

Functions

auto process (get_latest_block_batch_info request) -> latest_block_batch_info_result
 
output_type process_call (input_type input)
 

Typedef Documentation

◆ input_type

◆ output_type

◆ time_point

◆ varint

Function Documentation

◆ process()

auto system_contracts::testing::test_contracts::blockinfo_tester::process ( get_latest_block_batch_info request) -> latest_block_batch_info_result

Definition at line 19 of file blockinfo_tester.cpp.

20{
22
24 block_info::get_latest_block_batch_info(request.batch_start_height_offset, request.batch_size);
25
26 response.result = std::move(res.result);
27 response.error_code.value = static_cast<uint32_t>(res.error_code);
28
29 sysio::print("get_latest_block_batch_info: response error_code = ", response.error_code.value, "\n");
30 if (response.result.has_value()) {
31 const auto& result = *response.result;
32 sysio::print("get_latest_block_batch_info: response result:\n");
33 sysio::print(" batch_start_height = ", result.batch_start_height, "\n");
34 sysio::print(" batch_current_end_height = ", result.batch_current_end_height, "\n");
35 }
36
37 return response;
38}
latest_block_batch_info_result get_latest_block_batch_info(uint32_t batch_start_height_offset, uint32_t batch_size, sysio::name system_account_name="sysio"_n)
unsigned int uint32_t
Definition stdint.h:126
Here is the call graph for this function:
Here is the caller graph for this function:

◆ process_call()

output_type system_contracts::testing::test_contracts::blockinfo_tester::process_call ( input_type input)

Definition at line 40 of file blockinfo_tester.cpp.

41{
42 return std::visit([](auto&& arg) -> output_type { return process(std::move(arg)); }, std::move(input));
43}
std::variant< latest_block_batch_info_result > output_type
auto process(get_latest_block_batch_info request) -> latest_block_batch_info_result
Here is the call graph for this function: