6#ifndef ALT_INTEGRATION_VERIBLOCK_MEMPOOL_RELATIONS_HPP
7#define ALT_INTEGRATION_VERIBLOCK_MEMPOOL_RELATIONS_HPP
14#include "blockchain/alt_block_tree.hpp"
15#include "entities/atv.hpp"
16#include "entities/popdata.hpp"
17#include "entities/vbkblock.hpp"
18#include "entities/vtb.hpp"
26struct VbkPayloadsRelations {
27 using id_t = VbkBlock::id_t;
28 using height_t =
typename VbkBlock::height_t;
32 int operator()(
const std::shared_ptr<ATV>& a,
33 const std::shared_ptr<ATV>& b)
const;
40 int operator()(
const std::shared_ptr<ATV>& a,
41 const std::shared_ptr<ATV>& b)
const;
46 : txFeeComparator(), endorsedAltComparator(tree) {}
47 bool operator()(
const std::shared_ptr<ATV>& a,
48 const std::shared_ptr<ATV>& b)
const;
57 header(std::make_shared<
VbkBlock>(b)),
59 atvs(atvComparator) {}
62 std::shared_ptr<VbkBlock> ptr_b)
64 header(std::move(ptr_b)),
66 atvs(atvComparator) {}
68 const AltBlockTree& tree_;
69 std::shared_ptr<VbkBlock> header;
70 std::vector<std::shared_ptr<VTB>> vtbs;
71 AtvCombinedComparator atvComparator;
72 std::set<std::shared_ptr<ATV>, AtvCombinedComparator> atvs;
74 bool empty()
const {
return atvs.empty() && vtbs.empty(); }
Represents simplified view on Altchain's block tree, maintains VBK tree and BTC tree.