rippled
Loading...
Searching...
No Matches
SHAMap.h
1#ifndef XRPL_SHAMAP_SHAMAP_H_INCLUDED
2#define XRPL_SHAMAP_SHAMAP_H_INCLUDED
3
4#include <xrpl/basics/IntrusivePointer.h>
5#include <xrpl/basics/UnorderedContainers.h>
6#include <xrpl/beast/utility/Journal.h>
7#include <xrpl/beast/utility/instrumentation.h>
8#include <xrpl/nodestore/Database.h>
9#include <xrpl/nodestore/NodeObject.h>
10#include <xrpl/shamap/Family.h>
11#include <xrpl/shamap/SHAMapAddNode.h>
12#include <xrpl/shamap/SHAMapInnerNode.h>
13#include <xrpl/shamap/SHAMapItem.h>
14#include <xrpl/shamap/SHAMapLeafNode.h>
15#include <xrpl/shamap/SHAMapMissingNode.h>
16#include <xrpl/shamap/SHAMapTreeNode.h>
17
18#include <set>
19#include <stack>
20#include <vector>
21
22namespace ripple {
23
24class SHAMapNodeID;
25class SHAMapSyncFilter;
26
28enum class SHAMapState {
33 Modifying = 0,
34
39 Immutable = 1,
40
45 Synching = 2,
46
51 Invalid = 3,
52};
53
77class SHAMap
78{
79private:
82
85
88
92 bool backed_ = true; // Map is backed by the database
93 mutable bool full_ = false; // Map is believed complete in database
94
95public:
98 static inline constexpr unsigned int branchFactor =
100
102 static inline constexpr unsigned int leafDepth = 64;
103
105 boost::intrusive_ptr<SHAMapItem const>,
106 boost::intrusive_ptr<SHAMapItem const>>;
108
109 SHAMap() = delete;
110 SHAMap(SHAMap const&) = delete;
111 SHAMap&
112 operator=(SHAMap const&) = delete;
113
114 // Take a snapshot of the given map:
115 SHAMap(SHAMap const& other, bool isMutable);
116
117 // build new map
118 SHAMap(SHAMapType t, Family& f);
119
120 SHAMap(SHAMapType t, uint256 const& hash, Family& f);
121
122 ~SHAMap() = default;
123
124 Family const&
125 family() const
126 {
127 return f_;
128 }
129
130 Family&
132 {
133 return f_;
134 }
135
136 //--------------------------------------------------------------------------
137
142 class const_iterator;
143
145 begin() const;
147 end() const;
148
149 //--------------------------------------------------------------------------
150
151 // Returns a new map that's a snapshot of this one.
152 // Handles copy on write for mutable snapshots.
154 snapShot(bool isMutable) const;
155
156 /* Mark this SHAMap as "should be full", indicating
157 that the local server wants all the corresponding nodes
158 in durable storage.
159 */
160 void
161 setFull();
162
163 void
165
166 bool
167 fetchRoot(SHAMapHash const& hash, SHAMapSyncFilter* filter);
168
169 // normal hash access functions
170
172 bool
173 hasItem(uint256 const& id) const;
174
175 bool
176 delItem(uint256 const& id);
177
178 bool
179 addItem(SHAMapNodeType type, boost::intrusive_ptr<SHAMapItem const> item);
180
182 getHash() const;
183
184 // save a copy if you have a temporary anyway
185 bool
187 SHAMapNodeType type,
188 boost::intrusive_ptr<SHAMapItem const> item);
189
190 bool
192 SHAMapNodeType type,
193 boost::intrusive_ptr<SHAMapItem const> item);
194
195 // Save a copy if you need to extend the life
196 // of the SHAMapItem beyond this SHAMap
197 boost::intrusive_ptr<SHAMapItem const> const&
198 peekItem(uint256 const& id) const;
199 boost::intrusive_ptr<SHAMapItem const> const&
200 peekItem(uint256 const& id, SHAMapHash& hash) const;
201
202 // traverse functions
210 upper_bound(uint256 const& id) const;
211
219 lower_bound(uint256 const& id) const;
220
226 void
227 visitNodes(std::function<bool(SHAMapTreeNode&)> const& function) const;
228
235 void
237 SHAMap const* have,
238 std::function<bool(SHAMapTreeNode const&)> const&) const;
239
244 void
247 void(boost::intrusive_ptr<SHAMapItem const> const&)> const&) const;
248
249 // comparison/sync functions
250
262 getMissingNodes(int maxNodes, SHAMapSyncFilter* filter);
263
264 bool
266 SHAMapNodeID const& wanted,
268 bool fatLeaves,
269 std::uint32_t depth) const;
270
278 getProofPath(uint256 const& key) const;
279
287 static bool
289 uint256 const& rootHash,
290 uint256 const& key,
291 std::vector<Blob> const& path);
292
294 void
295 serializeRoot(Serializer& s) const;
296
299 SHAMapHash const& hash,
300 Slice const& rootNode,
301 SHAMapSyncFilter* filter);
304 SHAMapNodeID const& nodeID,
305 Slice const& rawNode,
306 SHAMapSyncFilter* filter);
307
308 // status functions
309 void
310 setImmutable();
311 bool
312 isSynching() const;
313 void
314 setSynching();
315 void
317 bool
318 isValid() const;
319
320 // caution: otherMap must be accessed only by this function
321 // return value: true=successfully completed, false=too different
322 bool
323 compare(SHAMap const& otherMap, Delta& differences, int maxCount) const;
324
326 int
327 unshare();
328
330 int
332
333 void
334 walkMap(std::vector<SHAMapMissingNode>& missingNodes, int maxMissing) const;
335 bool
337 std::vector<SHAMapMissingNode>& missingNodes,
338 int maxMissing) const;
339 bool
340 deepCompare(SHAMap& other) const; // Intended for debug/test only
341
342 void
343 setUnbacked();
344
345 void
346 dump(bool withHashes = false) const;
347 void
348 invariants() const;
349
350private:
354 boost::intrusive_ptr<SHAMapItem const>,
355 boost::intrusive_ptr<SHAMapItem const>>;
356
357 // tree node cache operations
359 cacheLookup(SHAMapHash const& hash) const;
360
361 void
363 const;
364
365 // database operations
367 fetchNodeFromDB(SHAMapHash const& hash) const;
369 fetchNodeNT(SHAMapHash const& hash) const;
371 fetchNodeNT(SHAMapHash const& hash, SHAMapSyncFilter* filter) const;
373 fetchNode(SHAMapHash const& hash) const;
375 checkFilter(SHAMapHash const& hash, SHAMapSyncFilter* filter) const;
376
378 void
379 dirtyUp(
380 SharedPtrNodeStack& stack,
381 uint256 const& target,
383
388 walkTowardsKey(uint256 const& id, SharedPtrNodeStack* stack = nullptr)
389 const;
392 findKey(uint256 const& id) const;
393
395 template <class Node>
398
400 template <class Node>
403
407
408 // returns the first item at or below this node
412 SharedPtrNodeStack& stack,
413 int branch = 0) const;
414
415 // returns the last item at or below this node
417 lastBelow(
419 SharedPtrNodeStack& stack,
420 int branch = branchFactor) const;
421
422 // helper function for firstBelow and lastBelow
426 SharedPtrNodeStack& stack,
427 int branch,
429 int,
430 std::function<bool(int)>,
431 std::function<void(int&)>> const& loopParams) const;
432
433 // Simple descent
434 // Get a child of the specified node
436 descend(SHAMapInnerNode*, int branch) const;
438 descendThrow(SHAMapInnerNode*, int branch) const;
440 descend(SHAMapInnerNode&, int branch) const;
442 descendThrow(SHAMapInnerNode&, int branch) const;
443
444 // Descend with filter
445 // If pending, callback is called as if it called fetchNodeNT
450 SHAMapInnerNode* parent,
451 int branch,
452 SHAMapSyncFilter* filter,
453 bool& pending,
454 descendCallback&&) const;
455
457 descend(
458 SHAMapInnerNode* parent,
459 SHAMapNodeID const& parentID,
460 int branch,
461 SHAMapSyncFilter* filter) const;
462
463 // Non-storing
464 // Does not hook the returned node to its parent
466 descendNoStore(SHAMapInnerNode&, int branch) const;
467
469 boost::intrusive_ptr<SHAMapItem const> const&
471
472 bool
473 hasInnerNode(SHAMapNodeID const& nodeID, SHAMapHash const& hash) const;
474 bool
475 hasLeafNode(uint256 const& tag, SHAMapHash const& hash) const;
476
477 SHAMapLeafNode const*
478 peekFirstItem(SharedPtrNodeStack& stack) const;
479 SHAMapLeafNode const*
480 peekNextItem(uint256 const& id, SharedPtrNodeStack& stack) const;
481 bool
483 SHAMapTreeNode* node,
484 boost::intrusive_ptr<SHAMapItem const> const& otherMapItem,
485 bool isFirstMap,
486 Delta& differences,
487 int& maxCount) const;
488 int
489 walkSubTree(bool doWrite, NodeObjectType t);
490
491 // Structure to track information about call to
492 // getMissingNodes while it's in progress
494 {
495 MissingNodes() = delete;
496 MissingNodes(MissingNodes const&) = delete;
498 operator=(MissingNodes const&) = delete;
499
500 // basic parameters
501 int max_;
503 int const maxDefer_;
505
506 // nodes we have discovered to be missing
509
510 // nodes we are in the process of traversing
512 SHAMapInnerNode*, // pointer to the node
513 SHAMapNodeID, // the node's ID
514 int, // while child we check first
515 int, // which child we check next
516 bool>; // whether we've found any missing children yet
517
518 // We explicitly choose to specify the use of std::deque here, because
519 // we need to ensure that pointers and/or references to existing
520 // elements will not be invalidated during the course of element
521 // insertion and removal. Containers that do not offer this guarantee,
522 // such as std::vector, can't be used here.
524
525 // nodes we may have acquired from deferred reads
527 SHAMapInnerNode*, // parent node
528 SHAMapNodeID, // parent node ID
529 int, // branch
531
536
537 // nodes we need to resume after we get their children from deferred
538 // reads
540
542 int max,
543 SHAMapSyncFilter* filter,
544 int maxDefer,
545 std::uint32_t generation)
546 : max_(max)
547 , filter_(filter)
548 , maxDefer_(maxDefer)
549 , generation_(generation)
550 , deferred_(0)
551 {
552 missingNodes_.reserve(max);
553 finishedReads_.reserve(maxDefer);
554 }
555 };
556
557 // getMissingNodes helper functions
558 void
559 gmn_ProcessNodes(MissingNodes&, MissingNodes::StackEntry& node);
560 void
561 gmn_ProcessDeferredReads(MissingNodes&);
562
563 // fetch from DB helper function
566 SHAMapHash const& hash,
567 std::shared_ptr<NodeObject> const& object) const;
568};
569
570inline void
572{
573 full_ = true;
574}
575
576inline void
581
582inline void
584{
585 XRPL_ASSERT(
587 "ripple::SHAMap::setImmutable : state is valid");
589}
590
591inline bool
593{
595}
596
597inline void
602
603inline void
608
609inline bool
611{
613}
614
615inline void
617{
618 backed_ = false;
619}
620
621//------------------------------------------------------------------------------
622
624{
625public:
629 using reference = value_type const&;
630 using pointer = value_type const*;
631
632private:
634 SHAMap const* map_ = nullptr;
635 pointer item_ = nullptr;
636
637public:
638 const_iterator() = delete;
639
640 const_iterator(const_iterator const& other) = default;
642 operator=(const_iterator const& other) = default;
643
644 ~const_iterator() = default;
645
647 operator*() const;
648 pointer
649 operator->() const;
650
652 operator++();
654 operator++(int);
655
656private:
657 explicit const_iterator(SHAMap const* map);
659 const_iterator(SHAMap const* map, pointer item, SharedPtrNodeStack&& stack);
660
661 friend bool
662 operator==(const_iterator const& x, const_iterator const& y);
663 friend class SHAMap;
664};
665
666inline SHAMap::const_iterator::const_iterator(SHAMap const* map) : map_(map)
667{
668 XRPL_ASSERT(
669 map_,
670 "ripple::SHAMap::const_iterator::const_iterator : non-null input");
671
672 if (auto temp = map_->peekFirstItem(stack_))
673 item_ = temp->peekItem().get();
674}
675
677 : map_(map)
678{
679}
680
682 SHAMap const* map,
683 pointer item,
684 SharedPtrNodeStack&& stack)
685 : stack_(std::move(stack)), map_(map), item_(item)
686{
687}
688
691{
692 return *item_;
693}
694
697{
698 return item_;
699}
700
703{
704 if (auto temp = map_->peekNextItem(item_->key(), stack_))
705 item_ = temp->peekItem().get();
706 else
707 item_ = nullptr;
708 return *this;
709}
710
713{
714 auto tmp = *this;
715 ++(*this);
716 return tmp;
717}
718
719inline bool
721{
722 XRPL_ASSERT(
723 x.map_ == y.map_,
724 "ripple::operator==(SHAMap::const_iterator, SHAMap::const_iterator) : "
725 "inputs map do match");
726 return x.item_ == y.item_;
727}
728
729inline bool
731{
732 return !(x == y);
733}
734
735inline SHAMap::const_iterator
737{
738 return const_iterator(this);
739}
740
743{
744 return const_iterator(this, nullptr);
745}
746
747} // namespace ripple
748
749#endif
A generic endpoint for log messages.
Definition Journal.h:41
const_iterator(ReadView const &view, Keylet const &root, Keylet const &page)
Definition Dir.h:96
reference operator*() const
Definition Dir.cpp:51
value_type const & reference
Definition Dir.h:47
const_iterator & operator++()
Definition Dir.cpp:62
value_type const * pointer
Definition Dir.h:46
pointer operator->() const
Definition Dir.h:64
static constexpr unsigned int branchFactor
Each inner node has 16 children (the 'radix tree' part of the map)
Identifies a node inside a SHAMap.
value_type const * pointer
Definition SHAMap.h:630
SharedPtrNodeStack stack_
Definition SHAMap.h:633
const_iterator(const_iterator const &other)=default
const_iterator & operator++()
Definition SHAMap.h:702
reference operator*() const
Definition SHAMap.h:690
value_type const & reference
Definition SHAMap.h:629
friend bool operator==(const_iterator const &x, const_iterator const &y)
Definition SHAMap.h:720
const_iterator & operator=(const_iterator const &other)=default
pointer operator->() const
Definition SHAMap.h:696
A SHAMap is both a radix tree with a fan-out of 16 and a Merkle tree.
Definition SHAMap.h:78
intr_ptr::SharedPtr< Node > preFlushNode(intr_ptr::SharedPtr< Node > node) const
prepare a node to be modified before flushing
Definition SHAMap.cpp:997
Family & family()
Definition SHAMap.h:131
SHAMapTreeNode * descendAsync(SHAMapInnerNode *parent, int branch, SHAMapSyncFilter *filter, bool &pending, descendCallback &&) const
Definition SHAMap.cpp:374
bool hasItem(uint256 const &id) const
Does the tree have an item with the given ID?
Definition SHAMap.cpp:696
bool backed_
Definition SHAMap.h:92
intr_ptr::SharedPtr< SHAMapTreeNode > cacheLookup(SHAMapHash const &hash) const
Definition SHAMap.cpp:1204
intr_ptr::SharedPtr< Node > unshareNode(intr_ptr::SharedPtr< Node >, SHAMapNodeID const &nodeID)
Unshare the node, allowing it to be modified.
Definition SHAMap.cpp:418
beast::Journal journal_
Definition SHAMap.h:81
static constexpr unsigned int leafDepth
The depth of the hash map: data is only present in the leaves.
Definition SHAMap.h:102
void dump(bool withHashes=false) const
Definition SHAMap.cpp:1159
void setUnbacked()
Definition SHAMap.h:616
boost::intrusive_ptr< SHAMapItem const > const & onlyBelow(SHAMapTreeNode *) const
If there is only one leaf below this node, get its contents.
Definition SHAMap.cpp:507
void gmn_ProcessNodes(MissingNodes &, MissingNodes::StackEntry &node)
SHAMapTreeNode * descendThrow(SHAMapInnerNode *, int branch) const
Definition SHAMap.cpp:276
std::map< uint256, DeltaItem > Delta
Definition SHAMap.h:107
intr_ptr::SharedPtr< SHAMapTreeNode > root_
Definition SHAMap.h:89
boost::intrusive_ptr< SHAMapItem const > const & peekItem(uint256 const &id) const
Definition SHAMap.cpp:598
SHAMapType const type_
Definition SHAMap.h:91
bool isSynching() const
Definition SHAMap.h:592
SHAMapState state_
Definition SHAMap.h:90
Family const & family() const
Definition SHAMap.h:125
Family & f_
Definition SHAMap.h:80
bool getNodeFat(SHAMapNodeID const &wanted, std::vector< std::pair< SHAMapNodeID, Blob > > &data, bool fatLeaves, std::uint32_t depth) const
intr_ptr::SharedPtr< SHAMapTreeNode > finishFetch(SHAMapHash const &hash, std::shared_ptr< NodeObject > const &object) const
Definition SHAMap.cpp:158
bool addGiveItem(SHAMapNodeType type, boost::intrusive_ptr< SHAMapItem const > item)
Definition SHAMap.cpp:784
SHAMapLeafNode * walkTowardsKey(uint256 const &id, SharedPtrNodeStack *stack=nullptr) const
Walk towards the specified id, returning the node.
Definition SHAMap.cpp:112
SHAMapTreeNode * descend(SHAMapInnerNode *, int branch) const
Definition SHAMap.cpp:298
SHAMapLeafNode const * peekNextItem(uint256 const &id, SharedPtrNodeStack &stack) const
Definition SHAMap.cpp:562
void clearSynching()
Definition SHAMap.h:604
void setImmutable()
Definition SHAMap.h:583
SHAMapAddNode addKnownNode(SHAMapNodeID const &nodeID, Slice const &rawNode, SHAMapSyncFilter *filter)
void canonicalize(SHAMapHash const &hash, intr_ptr::SharedPtr< SHAMapTreeNode > &) const
Definition SHAMap.cpp:1214
SHAMapAddNode addRootNode(SHAMapHash const &hash, Slice const &rootNode, SHAMapSyncFilter *filter)
int walkSubTree(bool doWrite, NodeObjectType t)
Definition SHAMap.cpp:1028
void setLedgerSeq(std::uint32_t lseq)
Definition SHAMap.h:577
const_iterator end() const
Definition SHAMap.h:742
void invariants() const
Definition SHAMap.cpp:1229
void serializeRoot(Serializer &s) const
Serializes the root in a format appropriate for sending over the wire.
bool addItem(SHAMapNodeType type, boost::intrusive_ptr< SHAMapItem const > item)
Definition SHAMap.cpp:863
const_iterator upper_bound(uint256 const &id) const
Find the first item after the given item.
Definition SHAMap.cpp:621
bool hasInnerNode(SHAMapNodeID const &nodeID, SHAMapHash const &hash) const
Does this map have this inner node?
intr_ptr::SharedPtr< SHAMapTreeNode > writeNode(NodeObjectType t, intr_ptr::SharedPtr< SHAMapTreeNode > node) const
write and canonicalize modified node
Definition SHAMap.cpp:976
void setFull()
Definition SHAMap.h:571
intr_ptr::SharedPtr< SHAMapTreeNode > fetchNodeNT(SHAMapHash const &hash) const
Definition SHAMap.cpp:253
~SHAMap()=default
void gmn_ProcessDeferredReads(MissingNodes &)
std::uint32_t cowid_
ID to distinguish this map for all others we're sharing nodes with.
Definition SHAMap.h:84
SHAMapHash getHash() const
Definition SHAMap.cpp:871
void walkMap(std::vector< SHAMapMissingNode > &missingNodes, int maxMissing) const
SHAMap()=delete
bool walkMapParallel(std::vector< SHAMapMissingNode > &missingNodes, int maxMissing) const
void dirtyUp(SharedPtrNodeStack &stack, uint256 const &target, intr_ptr::SharedPtr< SHAMapTreeNode > terminal)
Update hashes up to the root.
Definition SHAMap.cpp:76
bool updateGiveItem(SHAMapNodeType type, boost::intrusive_ptr< SHAMapItem const > item)
Definition SHAMap.cpp:883
SHAMapLeafNode const * peekFirstItem(SharedPtrNodeStack &stack) const
Definition SHAMap.cpp:547
bool isValid() const
Definition SHAMap.h:610
std::vector< std::pair< SHAMapNodeID, uint256 > > getMissingNodes(int maxNodes, SHAMapSyncFilter *filter)
Check for nodes in the SHAMap not available.
intr_ptr::SharedPtr< SHAMapTreeNode > fetchNode(SHAMapHash const &hash) const
Definition SHAMap.cpp:265
void visitNodes(std::function< bool(SHAMapTreeNode &)> const &function) const
Visit every node in this SHAMap.
bool hasLeafNode(uint256 const &tag, SHAMapHash const &hash) const
Does this map have this leaf node?
intr_ptr::SharedPtr< SHAMapTreeNode > fetchNodeFromDB(SHAMapHash const &hash) const
Definition SHAMap.cpp:150
SHAMap & operator=(SHAMap const &)=delete
SHAMap(SHAMap const &)=delete
const_iterator begin() const
Definition SHAMap.h:736
intr_ptr::SharedPtr< SHAMapTreeNode > descendNoStore(SHAMapInnerNode &, int branch) const
Definition SHAMap.cpp:331
void setSynching()
Definition SHAMap.h:598
std::uint32_t ledgerSeq_
The sequence of the ledger that this map references, if any.
Definition SHAMap.h:87
bool delItem(uint256 const &id)
Definition SHAMap.cpp:702
bool fetchRoot(SHAMapHash const &hash, SHAMapSyncFilter *filter)
Definition SHAMap.cpp:928
const_iterator lower_bound(uint256 const &id) const
Find the object with the greatest object id smaller than the input id.
Definition SHAMap.cpp:658
void visitDifferences(SHAMap const *have, std::function< bool(SHAMapTreeNode const &)> const &) const
Visit every node in this SHAMap that is not present in the specified SHAMap.
void visitLeaves(std::function< void(boost::intrusive_ptr< SHAMapItem const > const &)> const &) const
Visit every leaf node in this SHAMap.
Definition SHAMapSync.cpp:9
SHAMapLeafNode * lastBelow(intr_ptr::SharedPtr< SHAMapTreeNode > node, SharedPtrNodeStack &stack, int branch=branchFactor) const
Definition SHAMap.cpp:481
bool walkBranch(SHAMapTreeNode *node, boost::intrusive_ptr< SHAMapItem const > const &otherMapItem, bool isFirstMap, Delta &differences, int &maxCount) const
std::shared_ptr< SHAMap > snapShot(bool isMutable) const
Definition SHAMap.cpp:70
int flushDirty(NodeObjectType t)
Flush modified nodes to the nodestore and convert them to shared.
Definition SHAMap.cpp:1021
int unshare()
Convert any modified nodes to shared.
Definition SHAMap.cpp:1014
intr_ptr::SharedPtr< SHAMapTreeNode > checkFilter(SHAMapHash const &hash, SHAMapSyncFilter *filter) const
Definition SHAMap.cpp:197
bool deepCompare(SHAMap &other) const
static bool verifyProofPath(uint256 const &rootHash, uint256 const &key, std::vector< Blob > const &path)
Verify the proof path.
SHAMapLeafNode * belowHelper(intr_ptr::SharedPtr< SHAMapTreeNode > node, SharedPtrNodeStack &stack, int branch, std::tuple< int, std::function< bool(int)>, std::function< void(int &)> > const &loopParams) const
Definition SHAMap.cpp:438
SHAMapLeafNode * findKey(uint256 const &id) const
Return nullptr if key not found.
Definition SHAMap.cpp:141
static constexpr unsigned int branchFactor
Number of children each non-leaf node has (the 'radix tree' part of the map)
Definition SHAMap.h:98
std::optional< std::vector< Blob > > getProofPath(uint256 const &key) const
Get the proof path of the key.
SHAMapLeafNode * firstBelow(intr_ptr::SharedPtr< SHAMapTreeNode >, SharedPtrNodeStack &stack, int branch=0) const
Definition SHAMap.cpp:493
A shared intrusive pointer class that supports weak pointers.
An immutable linear range of bytes.
Definition Slice.h:27
Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.
Definition algorithm.h:6
bool operator!=(Buffer const &lhs, Buffer const &rhs) noexcept
Definition Buffer.h:213
SHAMapState
Describes the current state of a given SHAMap.
Definition SHAMap.h:28
@ Immutable
The map is set in stone and cannot be changed.
@ Invalid
The map is known to not be valid.
@ Synching
The map's hash is fixed but valid nodes may be missing and can be added.
@ Modifying
The map is in flux and objects can be added and removed.
NodeObjectType
The types of node objects.
Definition NodeObject.h:13
@ pending
List will be valid in the future.
constexpr bool operator==(base_uint< Bits, Tag > const &lhs, base_uint< Bits, Tag > const &rhs)
Definition base_uint.h:566
STL namespace.
std::set< SHAMapHash > missingHashes_
Definition SHAMap.h:508
std::stack< StackEntry, std::deque< StackEntry > > stack_
Definition SHAMap.h:523
std::condition_variable deferCondVar_
Definition SHAMap.h:534
std::tuple< SHAMapInnerNode *, SHAMapNodeID, int, int, bool > StackEntry
Definition SHAMap.h:516
MissingNodes(int max, SHAMapSyncFilter *filter, int maxDefer, std::uint32_t generation)
Definition SHAMap.h:541
std::uint32_t generation_
Definition SHAMap.h:504
std::vector< std::pair< SHAMapNodeID, uint256 > > missingNodes_
Definition SHAMap.h:507
MissingNodes(MissingNodes const &)=delete
MissingNodes & operator=(MissingNodes const &)=delete
std::map< SHAMapInnerNode *, SHAMapNodeID > resumes_
Definition SHAMap.h:539
SHAMapSyncFilter * filter_
Definition SHAMap.h:502
std::vector< DeferredNode > finishedReads_
Definition SHAMap.h:535