6#ifndef VERIBLOCK_POP_CPP_ALT_COMMAND_GROUP_PROVIDER_HPP
7#define VERIBLOCK_POP_CPP_ALT_COMMAND_GROUP_PROVIDER_HPP
9#include <veriblock/pop/blockchain/blockchain_util.hpp>
10#include <veriblock/pop/blockchain/command_group.hpp>
11#include <veriblock/pop/entities/altblock.hpp>
12#include <veriblock/pop/entities/popdata.hpp>
13#include <veriblock/pop/storage/payloads_provider.hpp>
24 using command_groups_t = std::vector<std::unique_ptr<CommandGroup>>;
27 : _tree(tree), _payloadStore(payloadStore) {}
37 template <
typename Payload>
39 const typename Payload::id_t&
id,
Class that is used for storing validation state.
Represents simplified view on Altchain's block tree, maintains VBK tree and BTC tree.
A wrapper for the payload store that constructs command objects.
std::unique_ptr< CommandGroup > getCommand(const BlockIndex< AltBlock > &block, const typename Payload::id_t &id, ValidationState &state)
Get the command group for the given payload in the given block.
std::unique_ptr< command_groups_t > getCommands(const BlockIndex< AltBlock > &block, ValidationState &state)
Get command groups for a particular block.
Accessor for ATV/VTB/VbkBlock bodies given hash.