veriblock-pop-cpp
C++11 Libraries for leveraging VeriBlock Proof-Of-Proof blockchain technology.
altintegration::PayloadsStorage Struct Referenceabstract

Accessor for ATV/VTB/VbkBlock bodies given hash. More...

Detailed Description

Technically, a facade over on-disk storage.

Altchains are expected to implement this interface.

Definition at line 24 of file payloads_provider.hpp.

#include <payloads_provider.hpp>

+ Inheritance diagram for altintegration::PayloadsStorage:
+ Collaboration diagram for altintegration::PayloadsStorage:

Public Member Functions

virtual bool getATV (const ATV::id_t &ids, ATV &out, ValidationState &state)=0
 should write ATV identified by id into out, or return false More...
 
virtual bool getVTB (const VTB::id_t &ids, VTB &out, ValidationState &state)=0
 should write VTB identified by id into out, or return false More...
 
virtual bool getVBK (const VbkBlock::id_t &id, VbkBlock &out, ValidationState &state)=0
 should write VbkBlock identified by id into out, or return false More...
 
virtual void writePayloads (const PopData &payloads)=0
 
bool getPayload (const VbkBlock::id_t &id, VbkBlock &out, ValidationState &state)
 alias for getVBK More...
 
bool getPayload (const VTB::id_t &id, VTB &out, ValidationState &state)
 alias for getVTB More...
 
bool getPayload (const ATV::id_t &id, ATV &out, ValidationState &state)
 alias for getATV More...
 

Member Function Documentation

◆ getATV()

virtual bool altintegration::PayloadsStorage::getATV ( const ATV::id_t ids,
ATV out,
ValidationState state 
)
pure virtual

◆ getPayload() [1/3]

bool altintegration::PayloadsStorage::getPayload ( const ATV::id_t id,
ATV out,
ValidationState state 
)
inline

Definition at line 57 of file payloads_provider.hpp.

57 {
58 return getATV(id, out, state);
59 }
virtual bool getATV(const ATV::id_t &ids, ATV &out, ValidationState &state)=0
should write ATV identified by id into out, or return false

◆ getPayload() [2/3]

bool altintegration::PayloadsStorage::getPayload ( const VbkBlock::id_t id,
VbkBlock out,
ValidationState state 
)
inline

Definition at line 47 of file payloads_provider.hpp.

49 {
50 return getVBK(id, out, state);
51 }
virtual bool getVBK(const VbkBlock::id_t &id, VbkBlock &out, ValidationState &state)=0
should write VbkBlock identified by id into out, or return false

◆ getPayload() [3/3]

bool altintegration::PayloadsStorage::getPayload ( const VTB::id_t id,
VTB out,
ValidationState state 
)
inline

Definition at line 53 of file payloads_provider.hpp.

53 {
54 return getVTB(id, out, state);
55 }
virtual bool getVTB(const VTB::id_t &ids, VTB &out, ValidationState &state)=0
should write VTB identified by id into out, or return false

◆ getVBK()

virtual bool altintegration::PayloadsStorage::getVBK ( const VbkBlock::id_t id,
VbkBlock out,
ValidationState state 
)
pure virtual

◆ getVTB()

virtual bool altintegration::PayloadsStorage::getVTB ( const VTB::id_t ids,
VTB out,
ValidationState state 
)
pure virtual

The documentation for this struct was generated from the following file: