Bitcoin ABC 0.30.5
P2P Digital Currency
|
#include <shortidprocessor.h>
Public Member Functions | |
ShortIdProcessor (const std::vector< PrefilledItemType > &prefilledItems, const std::vector< uint64_t > &shortids, size_t maxShortIdPerBucket) | |
bool | isEvenlyDistributed () const |
Status accessors. More... | |
bool | hasShortIdCollision () const |
bool | hasOutOfBoundIndex () const |
size_t | getItemCount () const |
Total item count. More... | |
size_t | getShortIdCount () const |
Unique shortid count. More... | |
int | matchKnownItem (uint64_t shortid, const ItemType &item) |
Attempts to add a known item by matching its shortid with the supplied ones. More... | |
const ItemType & | getItem (size_t index) const |
Private Types | |
using | ItemType = typename std::remove_reference< decltype(std::declval< Adapter & >().getItem(std::declval< PrefilledItemType & >()))>::type |
Private Member Functions | |
int | addItem (uint32_t index, const ItemType &item) |
Private Attributes | |
bool | evenlyDistributed = true |
bool | shortIdCollision = false |
bool | outOfBoundIndex = false |
std::vector< ItemType > | itemsAvailable |
std::vector< bool > | haveItem |
std::unordered_map< uint64_t, uint32_t > | shortIdIndexMap |
Definition at line 17 of file shortidprocessor.h.
|
private |
Definition at line 18 of file shortidprocessor.h.
|
inline |
|
inlineprivate |
|
inline |
|
inline |
Total item count.
Definition at line 92 of file shortidprocessor.h.
|
inline |
Unique shortid count.
Definition at line 94 of file shortidprocessor.h.
|
inline |
Definition at line 89 of file shortidprocessor.h.
|
inline |
Definition at line 88 of file shortidprocessor.h.
|
inline |
Status accessors.
Definition at line 87 of file shortidprocessor.h.
|
inline |
Attempts to add a known item by matching its shortid with the supplied ones.
The shortids must be processed prior from calling this method.
[in] | shortid | The shortid of the item |
[in] | item | The item to be added, whose index is retrieved from its shortid |
Definition at line 109 of file shortidprocessor.h.
|
private |
Definition at line 22 of file shortidprocessor.h.
|
private |
Definition at line 27 of file shortidprocessor.h.
|
private |
Definition at line 26 of file shortidprocessor.h.
|
private |
Definition at line 24 of file shortidprocessor.h.
|
private |
Definition at line 23 of file shortidprocessor.h.
|
private |
Definition at line 28 of file shortidprocessor.h.