veriblock-pop-cpp
C++11 Libraries for leveraging VeriBlock Proof-Of-Proof blockchain technology.
mempool.h
1// Copyright (c) 2019-2022 Xenios SEZC
2// https://www.veriblock.org
3// Distributed under the MIT software license, see the accompanying
4// file LICENSE or http://www.opensource.org/licenses/mit-license.php.
5
6#ifndef VERIBLOCK_POP_CPP_C_MEMPOOL_H
7#define VERIBLOCK_POP_CPP_C_MEMPOOL_H
8
9#include "veriblock/pop/c/array.h"
10#include "veriblock/pop/c/entities/atv.h"
11#include "veriblock/pop/c/entities/popdata.h"
12#include "veriblock/pop/c/entities/publication_data.h"
13#include "veriblock/pop/c/entities/vbkblock.h"
14#include "veriblock/pop/c/entities/vtb.h"
15#include "veriblock/pop/c/pop_context.h"
16
17#ifdef __cplusplus
18extern "C" {
19#endif
20
31POP_ENTITY_CUSTOM_FUNCTION(pop_context,
32 int,
33 mempool_submit_atv,
34 const POP_ENTITY_NAME(atv) * atv,
35 POP_ENTITY_NAME(validation_state) * state);
36
47POP_ENTITY_CUSTOM_FUNCTION(pop_context,
48 int,
49 mempool_submit_vtb,
50 const POP_ENTITY_NAME(vtb) * vtb,
51 POP_ENTITY_NAME(validation_state) * state);
52
64POP_ENTITY_CUSTOM_FUNCTION(pop_context,
65 int,
66 mempool_submit_vbk,
67 const POP_ENTITY_NAME(vbk_block) * vbk_block,
68 POP_ENTITY_NAME(validation_state) * state);
69
76POP_ENTITY_CUSTOM_FUNCTION(pop_context,
77 POP_ENTITY_NAME(pop_data) *,
78 mempool_generate_pop_data);
79
88POP_ENTITY_CUSTOM_FUNCTION(pop_context,
89 POP_ENTITY_NAME(atv) *,
90 mempool_get_atv,
91 POP_ARRAY_NAME(u8) id);
92
101POP_ENTITY_CUSTOM_FUNCTION(pop_context,
102 POP_ENTITY_NAME(vtb) *,
103 mempool_get_vtb,
104 POP_ARRAY_NAME(u8) id);
105
114POP_ENTITY_CUSTOM_FUNCTION(pop_context,
115 POP_ENTITY_NAME(vbk_block) *,
116 mempool_get_vbk_block,
117 POP_ARRAY_NAME(u8) id);
118
128POP_ENTITY_CUSTOM_FUNCTION(pop_context, POP_ARRAY_NAME(atv), mempool_get_atvs);
129
139POP_ENTITY_CUSTOM_FUNCTION(pop_context, POP_ARRAY_NAME(vtb), mempool_get_vtbs);
140
150POP_ENTITY_CUSTOM_FUNCTION(pop_context,
151 POP_ARRAY_NAME(vbk_block),
152 mempool_get_vbk_blocks);
153
163POP_ENTITY_CUSTOM_FUNCTION(pop_context,
164 POP_ARRAY_NAME(atv),
165 mempool_get_in_flight_atvs);
166
176POP_ENTITY_CUSTOM_FUNCTION(pop_context,
177 POP_ARRAY_NAME(vtb),
178 mempool_get_in_flight_vtbs);
179
189POP_ENTITY_CUSTOM_FUNCTION(pop_context,
190 POP_ARRAY_NAME(vbk_block),
191 mempool_get_in_flight_vbk_blocks);
192
203POP_ENTITY_CUSTOM_FUNCTION(pop_context,
204 POP_ARRAY_NAME(array_u8),
205 mempool_get_missing_btc_blocks);
206
214POP_ENTITY_CUSTOM_FUNCTION(pop_context,
215 void,
216 mempool_remove_all,
217 const POP_ENTITY_NAME(pop_data) * pop_data);
218
224POP_ENTITY_CUSTOM_FUNCTION(pop_context, void, mempool_clean_up);
225
231POP_ENTITY_CUSTOM_FUNCTION(pop_context, void, mempool_clear);
232
233#ifdef __cplusplus
234} // end of extern "C"
235#endif
236
237#endif