Wire Sysio Wire Sysion 1.0.0
Loading...
Searching...
No Matches
response_test_fixture::mock_logfile_provider Struct Reference
Collaboration diagram for response_test_fixture::mock_logfile_provider:

Public Member Functions

 mock_logfile_provider (response_test_fixture &fixture)
 
get_block_t get_block (uint32_t height, const yield_function &yield={})
 

Public Attributes

response_test_fixturefixture
 

Detailed Description

MOCK implementation of the logfile input API

Definition at line 17 of file test_responses.cpp.

Constructor & Destructor Documentation

◆ mock_logfile_provider()

response_test_fixture::mock_logfile_provider::mock_logfile_provider ( response_test_fixture & fixture)
inline

Definition at line 18 of file test_responses.cpp.

Member Function Documentation

◆ get_block()

get_block_t response_test_fixture::mock_logfile_provider::get_block ( uint32_t height,
const yield_function & yield = {} )
inline

Read the trace for a given block

Parameters
block_height: the height of the data being read
Returns
empty optional if the data cannot be read OTHERWISE optional containing a 2-tuple of the block_trace and a flag indicating irreversibility
Exceptions
bad_data_exception: if the data is corrupt in some way

Definition at line 29 of file test_responses.cpp.

29 {}) {
30 return fixture.mock_get_block(height, yield);
31 }
std::function< get_block_t(uint32_t, const yield_function &)> mock_get_block

Member Data Documentation

◆ fixture

response_test_fixture& response_test_fixture::mock_logfile_provider::fixture

Definition at line 32 of file test_responses.cpp.


The documentation for this struct was generated from the following file: