6#ifndef VERIBLOCK_POP_CPP_C_UTILS_H
7#define VERIBLOCK_POP_CPP_C_UTILS_H
11#include "veriblock/pop/c/array.h"
12#include "veriblock/pop/c/entities/altblock.h"
13#include "veriblock/pop/c/entities/popdata.h"
14#include "veriblock/pop/c/entities/publication_data.h"
15#include "veriblock/pop/c/pop_context.h"
16#include "veriblock/pop/c/validation_state.h"
35POP_ENTITY_CUSTOM_FUNCTION(pop_context,
36 POP_ENTITY_NAME(publication_data) *,
37 generate_publication_data,
38 POP_ARRAY_NAME(u8) endorsed_block_header,
39 POP_ARRAY_NAME(u8) tx_root,
40 POP_ARRAY_NAME(u8) payout_info,
41 const POP_ENTITY_NAME(pop_data) * pop_data);
56POP_ENTITY_CUSTOM_FUNCTION(pop_context,
58 calculate_top_level_merkle_root,
59 POP_ARRAY_NAME(u8) tx_root,
60 POP_ARRAY_NAME(u8) prev_block_hash,
61 const POP_ENTITY_NAME(pop_data) * pop_data);
71POP_ENTITY_CUSTOM_FUNCTION(pop_context,
74 POP_ENTITY_NAME(validation_state) * state);
84POP_ENTITY_CUSTOM_FUNCTION(pop_context,
87 POP_ENTITY_NAME(validation_state) * state);
98POP_ENTITY_CUSTOM_FUNCTION(pop_context,
101 const POP_ENTITY_NAME(atv) * atv,
102 POP_ENTITY_NAME(validation_state) * state);
113POP_ENTITY_CUSTOM_FUNCTION(pop_context,
116 const POP_ENTITY_NAME(vtb) * vtb,
117 POP_ENTITY_NAME(validation_state) * state);
129POP_ENTITY_CUSTOM_FUNCTION(pop_context,
132 const POP_ENTITY_NAME(vbk_block) * vbk_block,
133 POP_ENTITY_NAME(validation_state) * state);
145POP_ENTITY_CUSTOM_FUNCTION(pop_context,
148 const POP_ENTITY_NAME(pop_data) * pop_data,
149 POP_ENTITY_NAME(validation_state) * state);