rippled
Loading...
Searching...
No Matches
SHAMap.h
1#pragma once
2
3#include <xrpl/basics/IntrusivePointer.h>
4#include <xrpl/basics/UnorderedContainers.h>
5#include <xrpl/beast/utility/Journal.h>
6#include <xrpl/beast/utility/instrumentation.h>
7#include <xrpl/nodestore/Database.h>
8#include <xrpl/nodestore/NodeObject.h>
9#include <xrpl/shamap/Family.h>
10#include <xrpl/shamap/SHAMapAddNode.h>
11#include <xrpl/shamap/SHAMapInnerNode.h>
12#include <xrpl/shamap/SHAMapItem.h>
13#include <xrpl/shamap/SHAMapLeafNode.h>
14#include <xrpl/shamap/SHAMapMissingNode.h>
15#include <xrpl/shamap/SHAMapTreeNode.h>
16
17#include <set>
18#include <stack>
19#include <vector>
20
21namespace xrpl {
22
23class SHAMapNodeID;
24class SHAMapSyncFilter;
25
27enum class SHAMapState {
32 Modifying = 0,
33
38 Immutable = 1,
39
44 Synching = 2,
45
50 Invalid = 3,
51};
52
76class SHAMap
77{
78private:
81
84
87
91 bool backed_ = true; // Map is backed by the database
92 mutable bool full_ = false; // Map is believed complete in database
93
94public:
97 static inline constexpr unsigned int branchFactor = SHAMapInnerNode::branchFactor;
98
100 static inline constexpr unsigned int leafDepth = 64;
101
102 using DeltaItem = std::pair<boost::intrusive_ptr<SHAMapItem const>, boost::intrusive_ptr<SHAMapItem const>>;
104
105 SHAMap() = delete;
106 SHAMap(SHAMap const&) = delete;
107 SHAMap&
108 operator=(SHAMap const&) = delete;
109
110 // Take a snapshot of the given map:
111 SHAMap(SHAMap const& other, bool isMutable);
112
113 // build new map
114 SHAMap(SHAMapType t, Family& f);
115
116 SHAMap(SHAMapType t, uint256 const& hash, Family& f);
117
118 ~SHAMap() = default;
119
120 Family const&
121 family() const
122 {
123 return f_;
124 }
125
126 Family&
128 {
129 return f_;
130 }
131
132 //--------------------------------------------------------------------------
133
138 class const_iterator;
139
141 begin() const;
143 end() const;
144
145 //--------------------------------------------------------------------------
146
147 // Returns a new map that's a snapshot of this one.
148 // Handles copy on write for mutable snapshots.
150 snapShot(bool isMutable) const;
151
152 /* Mark this SHAMap as "should be full", indicating
153 that the local server wants all the corresponding nodes
154 in durable storage.
155 */
156 void
157 setFull();
158
159 void
161
162 bool
163 fetchRoot(SHAMapHash const& hash, SHAMapSyncFilter* filter);
164
165 // normal hash access functions
166
168 bool
169 hasItem(uint256 const& id) const;
170
171 bool
172 delItem(uint256 const& id);
173
174 bool
175 addItem(SHAMapNodeType type, boost::intrusive_ptr<SHAMapItem const> item);
176
178 getHash() const;
179
180 // save a copy if you have a temporary anyway
181 bool
182 updateGiveItem(SHAMapNodeType type, boost::intrusive_ptr<SHAMapItem const> item);
183
184 bool
185 addGiveItem(SHAMapNodeType type, boost::intrusive_ptr<SHAMapItem const> item);
186
187 // Save a copy if you need to extend the life
188 // of the SHAMapItem beyond this SHAMap
189 boost::intrusive_ptr<SHAMapItem const> const&
190 peekItem(uint256 const& id) const;
191 boost::intrusive_ptr<SHAMapItem const> const&
192 peekItem(uint256 const& id, SHAMapHash& hash) const;
193
194 // traverse functions
202 upper_bound(uint256 const& id) const;
203
211 lower_bound(uint256 const& id) const;
212
218 void
219 visitNodes(std::function<bool(SHAMapTreeNode&)> const& function) const;
220
227 void
228 visitDifferences(SHAMap const* have, std::function<bool(SHAMapTreeNode const&)> const&) const;
229
234 void
235 visitLeaves(std::function<void(boost::intrusive_ptr<SHAMapItem const> const&)> const&) const;
236
237 // comparison/sync functions
238
250 getMissingNodes(int maxNodes, SHAMapSyncFilter* filter);
251
252 bool
254 SHAMapNodeID const& wanted,
256 bool fatLeaves,
257 std::uint32_t depth) const;
258
266 getProofPath(uint256 const& key) const;
267
275 static bool
276 verifyProofPath(uint256 const& rootHash, uint256 const& key, std::vector<Blob> const& path);
277
279 void
280 serializeRoot(Serializer& s) const;
281
283 addRootNode(SHAMapHash const& hash, Slice const& rootNode, SHAMapSyncFilter* filter);
285 addKnownNode(SHAMapNodeID const& nodeID, Slice const& rawNode, SHAMapSyncFilter* filter);
286
287 // status functions
288 void
289 setImmutable();
290 bool
291 isSynching() const;
292 void
293 setSynching();
294 void
296 bool
297 isValid() const;
298
299 // caution: otherMap must be accessed only by this function
300 // return value: true=successfully completed, false=too different
301 bool
302 compare(SHAMap const& otherMap, Delta& differences, int maxCount) const;
303
305 int
306 unshare();
307
309 int
311
312 void
313 walkMap(std::vector<SHAMapMissingNode>& missingNodes, int maxMissing) const;
314 bool
315 walkMapParallel(std::vector<SHAMapMissingNode>& missingNodes, int maxMissing) const;
316 bool
317 deepCompare(SHAMap& other) const; // Intended for debug/test only
318
319 void
320 setUnbacked();
321
322 void
323 dump(bool withHashes = false) const;
324 void
325 invariants() const;
326
327private:
329 using DeltaRef = std::pair<boost::intrusive_ptr<SHAMapItem const>, boost::intrusive_ptr<SHAMapItem const>>;
330
331 // tree node cache operations
333 cacheLookup(SHAMapHash const& hash) const;
334
335 void
337
338 // database operations
340 fetchNodeFromDB(SHAMapHash const& hash) const;
342 fetchNodeNT(SHAMapHash const& hash) const;
344 fetchNodeNT(SHAMapHash const& hash, SHAMapSyncFilter* filter) const;
346 fetchNode(SHAMapHash const& hash) const;
348 checkFilter(SHAMapHash const& hash, SHAMapSyncFilter* filter) const;
349
351 void
353
358 walkTowardsKey(uint256 const& id, SharedPtrNodeStack* stack = nullptr) const;
361 findKey(uint256 const& id) const;
362
364 template <class Node>
367
369 template <class Node>
372
376
377 // returns the first item at or below this node
380
381 // returns the last item at or below this node
384
385 // helper function for firstBelow and lastBelow
389 SharedPtrNodeStack& stack,
390 int branch,
391 std::tuple<int, std::function<bool(int)>, std::function<void(int&)>> const& loopParams) const;
392
393 // Simple descent
394 // Get a child of the specified node
396 descend(SHAMapInnerNode*, int branch) const;
398 descendThrow(SHAMapInnerNode*, int branch) const;
400 descend(SHAMapInnerNode&, int branch) const;
402 descendThrow(SHAMapInnerNode&, int branch) const;
403
404 // Descend with filter
405 // If pending, callback is called as if it called fetchNodeNT
408 descendAsync(SHAMapInnerNode* parent, int branch, SHAMapSyncFilter* filter, bool& pending, descendCallback&&) const;
409
411 descend(SHAMapInnerNode* parent, SHAMapNodeID const& parentID, int branch, SHAMapSyncFilter* filter) const;
412
413 // Non-storing
414 // Does not hook the returned node to its parent
416 descendNoStore(SHAMapInnerNode&, int branch) const;
417
419 boost::intrusive_ptr<SHAMapItem const> const&
421
422 bool
423 hasInnerNode(SHAMapNodeID const& nodeID, SHAMapHash const& hash) const;
424 bool
425 hasLeafNode(uint256 const& tag, SHAMapHash const& hash) const;
426
427 SHAMapLeafNode const*
428 peekFirstItem(SharedPtrNodeStack& stack) const;
429 SHAMapLeafNode const*
430 peekNextItem(uint256 const& id, SharedPtrNodeStack& stack) const;
431 bool
433 SHAMapTreeNode* node,
434 boost::intrusive_ptr<SHAMapItem const> const& otherMapItem,
435 bool isFirstMap,
436 Delta& differences,
437 int& maxCount) const;
438 int
439 walkSubTree(bool doWrite, NodeObjectType t);
440
441 // Structure to track information about call to
442 // getMissingNodes while it's in progress
444 {
445 MissingNodes() = delete;
446 MissingNodes(MissingNodes const&) = delete;
448 operator=(MissingNodes const&) = delete;
449
450 // basic parameters
451 int max_;
453 int const maxDefer_;
455
456 // nodes we have discovered to be missing
459
460 // nodes we are in the process of traversing
462 SHAMapInnerNode*, // pointer to the node
463 SHAMapNodeID, // the node's ID
464 int, // while child we check first
465 int, // which child we check next
466 bool>; // whether we've found any missing children yet
467
468 // We explicitly choose to specify the use of std::deque here, because
469 // we need to ensure that pointers and/or references to existing
470 // elements will not be invalidated during the course of element
471 // insertion and removal. Containers that do not offer this guarantee,
472 // such as std::vector, can't be used here.
474
475 // nodes we may have acquired from deferred reads
477 SHAMapInnerNode*, // parent node
478 SHAMapNodeID, // parent node ID
479 int, // branch
481
486
487 // nodes we need to resume after we get their children from deferred
488 // reads
490
491 MissingNodes(int max, SHAMapSyncFilter* filter, int maxDefer, std::uint32_t generation)
492 : max_(max), filter_(filter), maxDefer_(maxDefer), generation_(generation), deferred_(0)
493 {
494 missingNodes_.reserve(max);
495 finishedReads_.reserve(maxDefer);
496 }
497 };
498
499 // getMissingNodes helper functions
500 void
501 gmn_ProcessNodes(MissingNodes&, MissingNodes::StackEntry& node);
502 void
503 gmn_ProcessDeferredReads(MissingNodes&);
504
505 // fetch from DB helper function
507 finishFetch(SHAMapHash const& hash, std::shared_ptr<NodeObject> const& object) const;
508};
509
510inline void
512{
513 full_ = true;
514}
515
516inline void
521
522inline void
524{
525 XRPL_ASSERT(state_ != SHAMapState::Invalid, "xrpl::SHAMap::setImmutable : state is valid");
527}
528
529inline bool
531{
533}
534
535inline void
540
541inline void
546
547inline bool
549{
551}
552
553inline void
555{
556 backed_ = false;
557}
558
559//------------------------------------------------------------------------------
560
562{
563public:
567 using reference = value_type const&;
568 using pointer = value_type const*;
569
570private:
572 SHAMap const* map_ = nullptr;
573 pointer item_ = nullptr;
574
575public:
576 const_iterator() = delete;
577
578 const_iterator(const_iterator const& other) = default;
580 operator=(const_iterator const& other) = default;
581
582 ~const_iterator() = default;
583
585 operator*() const;
586 pointer
587 operator->() const;
588
590 operator++();
592 operator++(int);
593
594private:
595 explicit const_iterator(SHAMap const* map);
597 const_iterator(SHAMap const* map, pointer item, SharedPtrNodeStack&& stack);
598
599 friend bool
600 operator==(const_iterator const& x, const_iterator const& y);
601 friend class SHAMap;
602};
603
604inline SHAMap::const_iterator::const_iterator(SHAMap const* map) : map_(map)
605{
606 XRPL_ASSERT(map_, "xrpl::SHAMap::const_iterator::const_iterator : non-null input");
607
608 if (auto temp = map_->peekFirstItem(stack_))
609 item_ = temp->peekItem().get();
610}
611
613{
614}
615
617 : stack_(std::move(stack)), map_(map), item_(item)
618{
619}
620
623{
624 return *item_;
625}
626
629{
630 return item_;
631}
632
635{
636 if (auto temp = map_->peekNextItem(item_->key(), stack_))
637 item_ = temp->peekItem().get();
638 else
639 item_ = nullptr;
640 return *this;
641}
642
645{
646 auto tmp = *this;
647 ++(*this);
648 return tmp;
649}
650
651inline bool
653{
654 XRPL_ASSERT(
655 x.map_ == y.map_,
656 "xrpl::operator==(SHAMap::const_iterator, SHAMap::const_iterator) : "
657 "inputs map do match");
658 return x.item_ == y.item_;
659}
660
661inline bool
663{
664 return !(x == y);
665}
666
667inline SHAMap::const_iterator
669{
670 return const_iterator(this);
671}
672
675{
676 return const_iterator(this, nullptr);
677}
678
679} // namespace xrpl
A generic endpoint for log messages.
Definition Journal.h:40
value_type const * pointer
Definition Dir.h:45
const_iterator & operator++()
Definition Dir.cpp:59
pointer operator->() const
Definition Dir.h:63
const_iterator(ReadView const &view, Keylet const &root, Keylet const &page)
Definition Dir.h:95
reference operator*() const
Definition Dir.cpp:50
value_type const & reference
Definition Dir.h:46
static constexpr unsigned int branchFactor
Each inner node has 16 children (the 'radix tree' part of the map)
Identifies a node inside a SHAMap.
const_iterator(const_iterator const &other)=default
reference operator*() const
Definition SHAMap.h:622
SharedPtrNodeStack stack_
Definition SHAMap.h:571
const_iterator & operator++()
Definition SHAMap.h:634
value_type const & reference
Definition SHAMap.h:567
value_type const * pointer
Definition SHAMap.h:568
const_iterator & operator=(const_iterator const &other)=default
friend bool operator==(const_iterator const &x, const_iterator const &y)
Definition SHAMap.h:652
pointer operator->() const
Definition SHAMap.h:628
A SHAMap is both a radix tree with a fan-out of 16 and a Merkle tree.
Definition SHAMap.h:77
SHAMapTreeNode * descend(SHAMapInnerNode *, int branch) const
Definition SHAMap.cpp:269
SHAMapLeafNode * walkTowardsKey(uint256 const &id, SharedPtrNodeStack *stack=nullptr) const
Walk towards the specified id, returning the node.
Definition SHAMap.cpp:97
bool addItem(SHAMapNodeType type, boost::intrusive_ptr< SHAMapItem const > item)
Definition SHAMap.cpp:775
Family const & family() const
Definition SHAMap.h:121
static bool verifyProofPath(uint256 const &rootHash, uint256 const &key, std::vector< Blob > const &path)
Verify the proof path.
const_iterator upper_bound(uint256 const &id) const
Find the first item after the given item.
Definition SHAMap.cpp:557
SHAMapState state_
Definition SHAMap.h:89
const_iterator lower_bound(uint256 const &id) const
Find the object with the greatest object id smaller than the input id.
Definition SHAMap.cpp:590
bool full_
Definition SHAMap.h:92
intr_ptr::SharedPtr< SHAMapTreeNode > checkFilter(SHAMapHash const &hash, SHAMapSyncFilter *filter) const
Definition SHAMap.cpp:175
const_iterator end() const
Definition SHAMap.h:674
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:442
intr_ptr::SharedPtr< SHAMapTreeNode > writeNode(NodeObjectType t, intr_ptr::SharedPtr< SHAMapTreeNode > node) const
write and canonicalize modified node
Definition SHAMap.cpp:879
SHAMapTreeNode * descendAsync(SHAMapInnerNode *parent, int branch, SHAMapSyncFilter *filter, bool &pending, descendCallback &&) const
Definition SHAMap.cpp:334
const_iterator begin() const
Definition SHAMap.h:668
std::uint32_t cowid_
ID to distinguish this map for all others we're sharing nodes with.
Definition SHAMap.h:83
void setLedgerSeq(std::uint32_t lseq)
Definition SHAMap.h:517
Family & f_
Definition SHAMap.h:79
std::map< uint256, DeltaItem > Delta
Definition SHAMap.h:103
Family & family()
Definition SHAMap.h:127
boost::intrusive_ptr< SHAMapItem const > const & peekItem(uint256 const &id) const
Definition SHAMap.cpp:534
~SHAMap()=default
int flushDirty(NodeObjectType t)
Flush modified nodes to the nodestore and convert them to shared.
Definition SHAMap.cpp:920
intr_ptr::SharedPtr< SHAMapTreeNode > fetchNodeFromDB(SHAMapHash const &hash) const
Definition SHAMap.cpp:132
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 setUnbacked()
Definition SHAMap.h:554
SHAMapLeafNode * lastBelow(intr_ptr::SharedPtr< SHAMapTreeNode > node, SharedPtrNodeStack &stack, int branch=branchFactor) const
Definition SHAMap.cpp:433
static constexpr unsigned int leafDepth
The depth of the hash map: data is only present in the leaves.
Definition SHAMap.h:100
bool walkMapParallel(std::vector< SHAMapMissingNode > &missingNodes, int maxMissing) const
void walkMap(std::vector< SHAMapMissingNode > &missingNodes, int maxMissing) const
void setSynching()
Definition SHAMap.h:536
bool hasInnerNode(SHAMapNodeID const &nodeID, SHAMapHash const &hash) const
Does this map have this inner node?
intr_ptr::SharedPtr< SHAMapTreeNode > fetchNode(SHAMapHash const &hash) const
Definition SHAMap.cpp:236
SHAMap(SHAMap const &)=delete
bool isSynching() const
Definition SHAMap.h:530
SHAMapLeafNode const * peekNextItem(uint256 const &id, SharedPtrNodeStack &stack) const
Definition SHAMap.cpp:505
bool deepCompare(SHAMap &other) const
SHAMap & operator=(SHAMap const &)=delete
void dump(bool withHashes=false) const
Definition SHAMap.cpp:1053
beast::Journal journal_
Definition SHAMap.h:80
void gmn_ProcessNodes(MissingNodes &, MissingNodes::StackEntry &node)
std::vector< std::pair< SHAMapNodeID, uint256 > > getMissingNodes(int maxNodes, SHAMapSyncFilter *filter)
Check for nodes in the SHAMap not available.
void setFull()
Definition SHAMap.h:511
void serializeRoot(Serializer &s) const
Serializes the root in a format appropriate for sending over the wire.
SHAMapAddNode addRootNode(SHAMapHash const &hash, Slice const &rootNode, SHAMapSyncFilter *filter)
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:393
bool backed_
Definition SHAMap.h:91
static constexpr unsigned int branchFactor
Number of children each non-leaf node has (the 'radix tree' part of the map)
Definition SHAMap.h:97
bool isValid() const
Definition SHAMap.h:548
std::shared_ptr< SHAMap > snapShot(bool isMutable) const
Definition SHAMap.cpp:62
bool hasItem(uint256 const &id) const
Does the tree have an item with the given ID?
Definition SHAMap.cpp:625
int unshare()
Convert any modified nodes to shared.
Definition SHAMap.cpp:913
void visitLeaves(std::function< void(boost::intrusive_ptr< SHAMapItem const > const &)> const &) const
Visit every leaf node in this SHAMap.
Definition SHAMapSync.cpp:9
bool updateGiveItem(SHAMapNodeType type, boost::intrusive_ptr< SHAMapItem const > item)
Definition SHAMap.cpp:793
SHAMapType const type_
Definition SHAMap.h:90
SHAMap()=delete
intr_ptr::SharedPtr< SHAMapTreeNode > finishFetch(SHAMapHash const &hash, std::shared_ptr< NodeObject > const &object) const
Definition SHAMap.cpp:140
intr_ptr::SharedPtr< SHAMapTreeNode > fetchNodeNT(SHAMapHash const &hash) const
Definition SHAMap.cpp:224
bool hasLeafNode(uint256 const &tag, SHAMapHash const &hash) const
Does this map have this leaf node?
void canonicalize(SHAMapHash const &hash, intr_ptr::SharedPtr< SHAMapTreeNode > &) const
Definition SHAMap.cpp:1105
void setImmutable()
Definition SHAMap.h:523
void clearSynching()
Definition SHAMap.h:542
bool getNodeFat(SHAMapNodeID const &wanted, std::vector< std::pair< SHAMapNodeID, Blob > > &data, bool fatLeaves, std::uint32_t depth) const
void invariants() const
Definition SHAMap.cpp:1115
SHAMapLeafNode * findKey(uint256 const &id) const
Return nullptr if key not found.
Definition SHAMap.cpp:123
bool addGiveItem(SHAMapNodeType type, boost::intrusive_ptr< SHAMapItem const > item)
Definition SHAMap.cpp:708
void gmn_ProcessDeferredReads(MissingNodes &)
intr_ptr::SharedPtr< SHAMapTreeNode > cacheLookup(SHAMapHash const &hash) const
Definition SHAMap.cpp:1097
intr_ptr::SharedPtr< Node > preFlushNode(intr_ptr::SharedPtr< Node > node) const
prepare a node to be modified before flushing
Definition SHAMap.cpp:897
intr_ptr::SharedPtr< Node > unshareNode(intr_ptr::SharedPtr< Node >, SHAMapNodeID const &nodeID)
Unshare the node, allowing it to be modified.
Definition SHAMap.cpp:377
boost::intrusive_ptr< SHAMapItem const > const & onlyBelow(SHAMapTreeNode *) const
If there is only one leaf below this node, get its contents.
Definition SHAMap.cpp:453
void dirtyUp(SharedPtrNodeStack &stack, uint256 const &target, intr_ptr::SharedPtr< SHAMapTreeNode > terminal)
Update hashes up to the root.
Definition SHAMap.cpp:68
bool fetchRoot(SHAMapHash const &hash, SHAMapSyncFilter *filter)
Definition SHAMap.cpp:833
std::uint32_t ledgerSeq_
The sequence of the ledger that this map references, if any.
Definition SHAMap.h:86
intr_ptr::SharedPtr< SHAMapTreeNode > descendNoStore(SHAMapInnerNode &, int branch) const
Definition SHAMap.cpp:301
int walkSubTree(bool doWrite, NodeObjectType t)
Definition SHAMap.cpp:927
SHAMapAddNode addKnownNode(SHAMapNodeID const &nodeID, Slice const &rawNode, SHAMapSyncFilter *filter)
SHAMapHash getHash() const
Definition SHAMap.cpp:781
void visitNodes(std::function< bool(SHAMapTreeNode &)> const &function) const
Visit every node in this SHAMap.
bool delItem(uint256 const &id)
Definition SHAMap.cpp:631
SHAMapTreeNode * descendThrow(SHAMapInnerNode *, int branch) const
Definition SHAMap.cpp:247
intr_ptr::SharedPtr< SHAMapTreeNode > root_
Definition SHAMap.h:88
bool walkBranch(SHAMapTreeNode *node, boost::intrusive_ptr< SHAMapItem const > const &otherMapItem, bool isFirstMap, Delta &differences, int &maxCount) const
SHAMapLeafNode const * peekFirstItem(SharedPtrNodeStack &stack) const
Definition SHAMap.cpp:491
A shared intrusive pointer class that supports weak pointers.
An immutable linear range of bytes.
Definition Slice.h:26
STL namespace.
Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.
Definition algorithm.h:5
@ pending
List will be valid in the future.
NodeObjectType
The types of node objects.
Definition NodeObject.h:12
constexpr bool operator==(base_uint< Bits, Tag > const &lhs, base_uint< Bits, Tag > const &rhs)
Definition base_uint.h:552
bool operator!=(Buffer const &lhs, Buffer const &rhs) noexcept
Definition Buffer.h:209
SHAMapState
Describes the current state of a given SHAMap.
Definition SHAMap.h:27
@ 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.
std::condition_variable deferCondVar_
Definition SHAMap.h:484
std::map< SHAMapInnerNode *, SHAMapNodeID > resumes_
Definition SHAMap.h:489
std::vector< DeferredNode > finishedReads_
Definition SHAMap.h:485
MissingNodes & operator=(MissingNodes const &)=delete
std::tuple< SHAMapInnerNode *, SHAMapNodeID, int, int, bool > StackEntry
Definition SHAMap.h:466
std::set< SHAMapHash > missingHashes_
Definition SHAMap.h:458
std::vector< std::pair< SHAMapNodeID, uint256 > > missingNodes_
Definition SHAMap.h:457
MissingNodes(int max, SHAMapSyncFilter *filter, int maxDefer, std::uint32_t generation)
Definition SHAMap.h:491
MissingNodes(MissingNodes const &)=delete
std::stack< StackEntry, std::deque< StackEntry > > stack_
Definition SHAMap.h:473
SHAMapSyncFilter * filter_
Definition SHAMap.h:452
std::uint32_t generation_
Definition SHAMap.h:454