6#ifndef VERIBLOCK_POP_CPP_C_ENTITIES_BLOCK_INDEX_H
7#define VERIBLOCK_POP_CPP_C_ENTITIES_BLOCK_INDEX_H
11#include "veriblock/pop/c/array.h"
12#include "veriblock/pop/c/entities/altblock.h"
13#include "veriblock/pop/c/entities/btcblock.h"
14#include "veriblock/pop/c/entities/serde.h"
15#include "veriblock/pop/c/entities/vbkblock.h"
16#include "veriblock/pop/c/type_helpers.h"
33POP_DECLARE_ENTITY(alt_block_index);
34POP_DECLARE_ENTITY(vbk_block_index);
35POP_DECLARE_ENTITY(btc_block_index);
38POP_ENTITY_GETTER_FUNCTION(alt_block_index,
39 POP_ENTITY_NAME(alt_block) *,
41POP_ENTITY_GETTER_FUNCTION(vbk_block_index,
42 POP_ENTITY_NAME(vbk_block) *,
44POP_ENTITY_GETTER_FUNCTION(btc_block_index,
45 POP_ENTITY_NAME(btc_block) *,
48POP_ENTITY_GETTER_FUNCTION(alt_block_index, uint32_t, status);
49POP_ENTITY_GETTER_FUNCTION(vbk_block_index, uint32_t, status);
50POP_ENTITY_GETTER_FUNCTION(btc_block_index, uint32_t, status);
53POP_ENTITY_GETTER_FUNCTION(alt_block_index, uint32_t, height);
54POP_ENTITY_GETTER_FUNCTION(vbk_block_index, uint32_t, height);
55POP_ENTITY_GETTER_FUNCTION(btc_block_index, uint32_t, height);
58POP_ENTITY_CUSTOM_FUNCTION(alt_block_index,
bool, has_flag, uint32_t flag);
59POP_ENTITY_CUSTOM_FUNCTION(vbk_block_index,
bool, has_flag, uint32_t flag);
60POP_ENTITY_CUSTOM_FUNCTION(btc_block_index,
bool, has_flag, uint32_t flag);
63POP_ENTITY_TO_JSON(alt_block_index);
64POP_ENTITY_TO_JSON(vbk_block_index);
65POP_ENTITY_TO_JSON(btc_block_index);
@ BLOCK_FAILED_BLOCK
block is statelessly valid, but the altchain marked it as failed
@ BLOCK_VALID_UNKNOWN
default state for validity - validity state is unknown
@ BLOCK_FAILED_CHILD
block is state{lessly,fully} valid and the altchain did not report it as invalid, but some of the anc...
@ BLOCK_HAS_PAYLOADS
acceptBlockHeader has been executed on this block;
@ BLOCK_DELETED
the block is temporarily deleted
@ BLOCK_ACTIVE
the block is currently applied via SetState.
@ BLOCK_FAILED_MASK
all invalidity flags
@ BLOCK_FAILED_POP
block failed state{less,ful} validation due to its payloads
@ BLOCK_BOOTSTRAP
this is a bootstrap block