xrpld
Loading...
Searching...
No Matches
SHAMap.h
1#pragma once
2
3#include <xrpl/basics/Blob.h>
4#include <xrpl/basics/IntrusivePointer.h>
5#include <xrpl/basics/SHAMapHash.h>
6#include <xrpl/basics/base_uint.h>
7#include <xrpl/beast/utility/Journal.h>
8#include <xrpl/beast/utility/instrumentation.h>
9#include <xrpl/nodestore/NodeObject.h>
10#include <xrpl/protocol/Serializer.h>
11#include <xrpl/shamap/Family.h>
12#include <xrpl/shamap/SHAMapAddNode.h>
13#include <xrpl/shamap/SHAMapInnerNode.h>
14#include <xrpl/shamap/SHAMapItem.h>
15#include <xrpl/shamap/SHAMapLeafNode.h>
16#include <xrpl/shamap/SHAMapMissingNode.h>
17#include <xrpl/shamap/SHAMapTreeNode.h>
18
19#include <condition_variable>
20#include <cstddef>
21#include <cstdint>
22#include <deque>
23#include <functional>
24#include <iterator>
25#include <map>
26#include <memory>
27#include <mutex>
28#include <optional>
29#include <set>
30#include <stack>
31#include <tuple>
32#include <utility>
33#include <vector>
34
35namespace xrpl {
36
37class SHAMapNodeID;
39
43enum class SHAMapState {
50
57
64
71};
72
97
103{
105 // The `data` field (a Blob, 8-byte aligned) needs 4 bytes of padding after the `nodeID` field
106 // (36 bytes, 4-byte aligned) regardless of what comes between them, so `isLeaf` costs nothing
107 // extra here. Moving it after `data` would add 8 bytes to the size of this struct instead.
108 bool isLeaf;
110};
111
113{
114private:
117
122
127
131 bool backed_ = true; // Map is backed by the database
132 mutable bool full_ = false; // Map is believed complete in database
133
134public:
139 static constexpr unsigned int kBranchFactor = SHAMapInnerNode::kBranchFactor;
140
144 static constexpr unsigned int kLeafDepth = 64;
145
146 using DeltaItem =
147 std::pair<boost::intrusive_ptr<SHAMapItem const>, boost::intrusive_ptr<SHAMapItem const>>;
149
150 SHAMap() = delete;
151 SHAMap(SHAMap const&) = delete;
152 SHAMap&
153 operator=(SHAMap const&) = delete;
154
155 // Take a snapshot of the given map:
156 SHAMap(SHAMap const& other, bool isMutable);
157
158 // build new map
159 SHAMap(SHAMapType t, Family& f);
160
161 SHAMap(SHAMapType t, uint256 const& hash, Family& f);
162
163 ~SHAMap() = default;
164
165 Family const&
166 family() const
167 {
168 return f_;
169 }
170
171 Family&
173 {
174 return f_;
175 }
176
177 //--------------------------------------------------------------------------
178
184 class ConstIterator;
185
186 ConstIterator
187 begin() const;
188 ConstIterator
189 end() const;
190
191 //--------------------------------------------------------------------------
192
193 // Returns a new map that's a snapshot of this one.
194 // Handles copy on write for mutable snapshots.
196 snapShot(bool isMutable) const;
197
198 /* Mark this SHAMap as "should be full", indicating
199 that the local server wants all the corresponding nodes
200 in durable storage.
201 */
202 void
203 setFull();
204
205 void
207
208 bool
209 fetchRoot(SHAMapHash const& hash, SHAMapSyncFilter const* filter);
210
211 // normal hash access functions
212
216 bool
217 hasItem(uint256 const& id) const;
218
219 bool
220 delItem(uint256 const& id);
221
222 bool
223 addItem(SHAMapNodeType type, boost::intrusive_ptr<SHAMapItem const> item);
224
226 getHash() const;
227
228 // save a copy if you have a temporary anyway
229 bool
230 updateGiveItem(SHAMapNodeType type, boost::intrusive_ptr<SHAMapItem const> item);
231
232 bool
233 addGiveItem(SHAMapNodeType type, boost::intrusive_ptr<SHAMapItem const> item);
234
235 // Save a copy if you need to extend the life
236 // of the SHAMapItem beyond this SHAMap
237 boost::intrusive_ptr<SHAMapItem const> const&
238 peekItem(uint256 const& id) const;
239 boost::intrusive_ptr<SHAMapItem const> const&
240 peekItem(uint256 const& id, SHAMapHash& hash) const;
241
242 // traverse functions
250 ConstIterator
251 upperBound(uint256 const& id) const;
252
260 ConstIterator
261 lowerBound(uint256 const& id) const;
262
269 void
270 visitNodes(std::function<bool(SHAMapTreeNode&)> const& function) const;
271
279 void
280 visitDifferences(SHAMap const* have, std::function<bool(SHAMapTreeNode const&)> const&) const;
281
287 void
288 visitLeaves(std::function<void(boost::intrusive_ptr<SHAMapItem const> const&)> const&) const;
289
290 // comparison/sync functions
291
304 getMissingNodes(int maxNodes, SHAMapSyncFilter const* filter);
305
306 [[nodiscard]] bool
308 SHAMapNodeID const& wanted,
310 bool fatLeaves,
311 std::uint32_t depth) const;
312
320 getProofPath(uint256 const& key) const;
321
329 static bool
330 verifyProofPath(uint256 const& rootHash, uint256 const& key, std::vector<Blob> const& path);
331
335 void
336 serializeRoot(Serializer& s) const;
337
354 addRootNode(SHAMapHash const& hash, SHAMapTreeNodePtr rootNode, SHAMapSyncFilter const* filter);
355
374 SHAMapNodeID const& nodeID,
375 SHAMapTreeNodePtr treeNode,
376 SHAMapSyncFilter const* filter);
377
378 // status functions
379 void
380 setImmutable();
381 bool
382 isSynching() const;
383 void
384 setSynching();
385 void
387 bool
388 isValid() const;
389
390 // caution: otherMap must be accessed only by this function
391 // return value: true=successfully completed, false=too different
392 bool
393 compare(SHAMap const& otherMap, Delta& differences, int maxCount) const;
394
398 int
399 unshare();
400
404 int
406
407 void
408 walkMap(std::vector<SHAMapMissingNode>& missingNodes, int maxMissing) const;
409 bool
410 walkMapParallel(std::vector<SHAMapMissingNode>& missingNodes, int maxMissing) const;
411 bool
412 deepCompare(SHAMap& other) const; // Intended for debug/test only
413
414 void
415 setUnbacked();
416
417 void
418 dump(bool withHashes = false) const;
419 void
420 invariants() const;
421
422private:
424 using DeltaRef =
425 std::pair<boost::intrusive_ptr<SHAMapItem const>, boost::intrusive_ptr<SHAMapItem const>>;
426
427 // tree node cache operations
429 cacheLookup(SHAMapHash const& hash) const;
430
431 void
432 canonicalize(SHAMapHash const& hash, SHAMapTreeNodePtr&) const;
433
434 // database operations
436 fetchNodeFromDB(SHAMapHash const& hash) const;
438 fetchNodeNT(SHAMapHash const& hash) const;
440 fetchNodeNT(SHAMapHash const& hash, SHAMapSyncFilter const* filter) const;
442 fetchNode(SHAMapHash const& hash) const;
444 checkFilter(SHAMapHash const& hash, SHAMapSyncFilter const* filter) const;
445
449 void
450 dirtyUp(SharedPtrNodeStack& stack, uint256 const& target, SHAMapTreeNodePtr terminal);
451
458 walkTowardsKey(uint256 const& id, SharedPtrNodeStack* stack = nullptr) const;
463 findKey(uint256 const& id) const;
464
468 template <class Node>
471
475 template <class Node>
478
484
485 // returns the first item at or below this node
487 firstBelow(SHAMapTreeNodePtr node, SharedPtrNodeStack& stack, int branch = 0) const;
488
489 // returns the last item at or below this node
491 lastBelow(SHAMapTreeNodePtr node, SharedPtrNodeStack& stack, int branch = kBranchFactor) const;
492
493 // helper function for firstBelow and lastBelow
497 SharedPtrNodeStack& stack,
498 int branch,
499 std::tuple<int, std::function<bool(int)>, std::function<void(int&)>> const& loopParams)
500 const;
501
502 // Simple descent
503 // Get a child of the specified node
505 descend(SHAMapInnerNode*, int branch) const;
507 descendThrow(SHAMapInnerNode*, int branch) const;
509 descend(SHAMapInnerNode&, int branch) const;
511 descendThrow(SHAMapInnerNode&, int branch) const;
512
513 // Descend with filter
514 // If pending, callback is called as if it called fetchNodeNT
518 SHAMapInnerNode* parent,
519 int branch,
520 SHAMapSyncFilter const* filter,
521 bool& pending,
522 descendCallback&&) const;
523
525 descend(
526 SHAMapInnerNode* parent,
527 SHAMapNodeID const& parentID,
528 int branch,
529 SHAMapSyncFilter const* filter) const;
530
531 // Non-storing
532 // Does not hook the returned node to its parent
534 descendNoStore(SHAMapInnerNode&, int branch) const;
535
539 boost::intrusive_ptr<SHAMapItem const> const&
541
542 bool
543 hasInnerNode(SHAMapNodeID const& nodeID, SHAMapHash const& hash) const;
544 bool
545 hasLeafNode(uint256 const& tag, SHAMapHash const& hash) const;
546
547 SHAMapLeafNode const*
548 peekFirstItem(SharedPtrNodeStack& stack) const;
549 SHAMapLeafNode const*
550 peekNextItem(uint256 const& id, SharedPtrNodeStack& stack) const;
551 bool
553 SHAMapTreeNode* node,
554 boost::intrusive_ptr<SHAMapItem const> const& otherMapItem,
555 bool isFirstMap,
556 Delta& differences,
557 int& maxCount) const;
558 int
559 walkSubTree(bool doWrite, NodeObjectType t);
560
561 // Structure to track information about call to
562 // getMissingNodes while it's in progress
564 {
565 MissingNodes() = delete;
566 MissingNodes(MissingNodes const&) = delete;
568 operator=(MissingNodes const&) = delete;
569
570 // basic parameters
571 int max;
573 int const maxDefer;
575
576 // nodes we have discovered to be missing
579
580 // nodes we are in the process of traversing
582 SHAMapInnerNode*, // pointer to the node
583 SHAMapNodeID, // the node's ID
584 int, // while child we check first
585 int, // which child we check next
586 bool>; // whether we've found any missing children yet
587
588 // We explicitly choose to specify the use of std::deque here, because
589 // we need to ensure that pointers and/or references to existing
590 // elements will not be invalidated during the course of element
591 // insertion and removal. Containers that do not offer this guarantee,
592 // such as std::vector, can't be used here.
594
595 // nodes we may have acquired from deferred reads
597 SHAMapInnerNode*, // parent node
598 SHAMapNodeID, // parent node ID
599 int, // branch
600 SHAMapTreeNodePtr>; // node
601
606
607 // nodes we need to resume after we get their children from deferred
608 // reads
610
612 int max,
614 int maxDefer,
617 {
618 missingNodes.reserve(max);
619 finishedReads.reserve(maxDefer);
620 }
621 };
622
623 // getMissingNodes helper functions
624 void
625 gmnProcessNodes(MissingNodes&, MissingNodes::StackEntry& node);
626 static void
627 gmnProcessDeferredReads(MissingNodes&);
628
629 // fetch from DB helper function
631 finishFetch(SHAMapHash const& hash, std::shared_ptr<NodeObject> const& object) const;
632};
633
634inline void
636{
637 full_ = true;
638}
639
640inline void
645
646inline void
648{
649 XRPL_ASSERT(state_ != SHAMapState::Invalid, "xrpl::SHAMap::setImmutable : state is valid");
651}
652
653inline bool
655{
657}
658
659inline void
664
665inline void
670
671inline bool
673{
675}
676
677inline void
679{
680 backed_ = false;
681}
682
683//------------------------------------------------------------------------------
684
686{
687public:
691 using reference = value_type const&;
692 using pointer = value_type const*;
693
694private:
696 SHAMap const* map_ = nullptr;
697 pointer item_ = nullptr;
698
699public:
700 ConstIterator() = delete;
701
702 ConstIterator(ConstIterator const& other) = default;
704 operator=(ConstIterator const& other) = default;
705
706 ~ConstIterator() = default;
707
709 operator*() const;
710 pointer
711 operator->() const;
712
714 operator++();
716 operator++(int);
717
718private:
719 explicit ConstIterator(SHAMap const* map);
721 ConstIterator(SHAMap const* map, pointer item, SharedPtrNodeStack&& stack);
722
723 friend bool
724 operator==(ConstIterator const& x, ConstIterator const& y);
725 friend class SHAMap;
726};
727
729{
730 XRPL_ASSERT(map_, "xrpl::SHAMap::ConstIterator::ConstIterator : non-null input");
731
732 if (auto temp = map_->peekFirstItem(stack_))
733 item_ = temp->peekItem().get();
734}
735
739
741 SHAMap const* map,
742 pointer item,
743 SharedPtrNodeStack&& stack)
744 : stack_(std::move(stack)), map_(map), item_(item)
745{
746}
747
750{
751 return *item_;
752}
753
756{
757 return item_;
758}
759
762{
763 if (auto temp = map_->peekNextItem(item_->key(), stack_))
764 {
765 item_ = temp->peekItem().get();
766 }
767 else
768 {
769 item_ = nullptr;
770 }
771 return *this;
772}
773
776{
777 auto tmp = *this;
778 ++(*this);
779 return tmp;
780}
781
782inline bool
784{
785 XRPL_ASSERT(
786 x.map_ == y.map_,
787 "xrpl::operator==(SHAMap::const_iterator, SHAMap::const_iterator) : "
788 "inputs map do match");
789 return x.item_ == y.item_;
790}
791
794{
795 return ConstIterator(this);
796}
797
800{
801 return ConstIterator(this, nullptr);
802}
803
804} // namespace xrpl
A generic endpoint for log messages.
Definition Journal.h:44
static constexpr unsigned int kBranchFactor
Each inner node has 16 children (the 'radix tree' part of the map).
Identifies a node inside a SHAMap.
pointer operator->() const
Definition SHAMap.h:755
ConstIterator(ConstIterator const &other)=default
SharedPtrNodeStack stack_
Definition SHAMap.h:695
value_type const & reference
Definition SHAMap.h:691
ConstIterator & operator=(ConstIterator const &other)=default
friend bool operator==(ConstIterator const &x, ConstIterator const &y)
Definition SHAMap.h:783
SHAMap const * map_
Definition SHAMap.h:696
std::forward_iterator_tag iterator_category
Definition SHAMap.h:688
ConstIterator & operator++()
Definition SHAMap.h:761
value_type const * pointer
Definition SHAMap.h:692
reference operator*() const
Definition SHAMap.h:749
std::ptrdiff_t difference_type
Definition SHAMap.h:689
SHAMapTreeNode * descend(SHAMapInnerNode *, int branch) const
SHAMapLeafNode * walkTowardsKey(uint256 const &id, SharedPtrNodeStack *stack=nullptr) const
Walk towards the specified id, returning the node.
bool fetchRoot(SHAMapHash const &hash, SHAMapSyncFilter const *filter)
bool addItem(SHAMapNodeType type, boost::intrusive_ptr< SHAMapItem const > item)
Family const & family() const
Definition SHAMap.h:166
static bool verifyProofPath(uint256 const &rootHash, uint256 const &key, std::vector< Blob > const &path)
Verify the proof path.
ConstIterator lowerBound(uint256 const &id) const
Find the object with the greatest object id smaller than the input id.
SHAMapState state_
Definition SHAMap.h:129
bool full_
Definition SHAMap.h:132
std::optional< std::vector< Blob > > getProofPath(uint256 const &key) const
Get the proof path of the key.
SHAMapLeafNode * belowHelper(SHAMapTreeNodePtr node, SharedPtrNodeStack &stack, int branch, std::tuple< int, std::function< bool(int)>, std::function< void(int &)> > const &loopParams) const
std::uint32_t cowid_
ID to distinguish this map for all others we're sharing nodes with.
Definition SHAMap.h:121
SHAMapTreeNodePtr finishFetch(SHAMapHash const &hash, std::shared_ptr< NodeObject > const &object) const
void setLedgerSeq(std::uint32_t lseq)
Definition SHAMap.h:641
static constexpr unsigned int kLeafDepth
The depth of the hash map: data is only present in the leaves.
Definition SHAMap.h:144
SHAMapTreeNodePtr fetchNodeFromDB(SHAMapHash const &hash) const
Family & f_
Definition SHAMap.h:115
bool getNodeFat(SHAMapNodeID const &wanted, std::vector< SHAMapNodeData > &data, bool fatLeaves, std::uint32_t depth) const
std::map< uint256, DeltaItem > Delta
Definition SHAMap.h:148
std::pair< boost::intrusive_ptr< SHAMapItem const >, boost::intrusive_ptr< SHAMapItem const > > DeltaItem
Definition SHAMap.h:146
SHAMapTreeNodePtr cacheLookup(SHAMapHash const &hash) const
Family & family()
Definition SHAMap.h:172
boost::intrusive_ptr< SHAMapItem const > const & peekItem(uint256 const &id) const
std::vector< std::pair< SHAMapNodeID, uint256 > > getMissingNodes(int maxNodes, SHAMapSyncFilter const *filter)
Check for nodes in the SHAMap not available.
~SHAMap()=default
int flushDirty(NodeObjectType t)
Flush modified nodes to the nodestore and convert them to shared.
static void gmnProcessDeferredReads(MissingNodes &)
static constexpr unsigned int kBranchFactor
Number of children each non-leaf node has (the 'radix tree' part of the map).
Definition SHAMap.h:139
std::pair< boost::intrusive_ptr< SHAMapItem const >, boost::intrusive_ptr< SHAMapItem const > > DeltaRef
Definition SHAMap.h:424
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.
SHAMapTreeNodePtr fetchNode(SHAMapHash const &hash) const
void setUnbacked()
Definition SHAMap.h:678
bool walkMapParallel(std::vector< SHAMapMissingNode > &missingNodes, int maxMissing) const
void walkMap(std::vector< SHAMapMissingNode > &missingNodes, int maxMissing) const
SHAMapLeafNode * firstBelow(SHAMapTreeNodePtr node, SharedPtrNodeStack &stack, int branch=0) const
void setSynching()
Definition SHAMap.h:660
bool hasInnerNode(SHAMapNodeID const &nodeID, SHAMapHash const &hash) const
Does this map have this inner node?
SHAMap(SHAMap const &)=delete
bool isSynching() const
Definition SHAMap.h:654
SHAMapLeafNode const * peekNextItem(uint256 const &id, SharedPtrNodeStack &stack) const
bool deepCompare(SHAMap &other) const
void gmnProcessNodes(MissingNodes &, MissingNodes::StackEntry &node)
SHAMap & operator=(SHAMap const &)=delete
void dump(bool withHashes=false) const
beast::Journal journal_
Definition SHAMap.h:116
bool compare(SHAMap const &otherMap, Delta &differences, int maxCount) const
void setFull()
Definition SHAMap.h:635
SHAMapAddNode addRootNode(SHAMapHash const &hash, SHAMapTreeNodePtr rootNode, SHAMapSyncFilter const *filter)
Add a root node to the SHAMap during synchronization.
void serializeRoot(Serializer &s) const
Serializes the root in a format appropriate for sending over the wire.
SHAMapLeafNode * lastBelow(SHAMapTreeNodePtr node, SharedPtrNodeStack &stack, int branch=kBranchFactor) const
bool backed_
Definition SHAMap.h:131
bool isValid() const
Definition SHAMap.h:672
std::shared_ptr< SHAMap > snapShot(bool isMutable) const
bool hasItem(uint256 const &id) const
Does the tree have an item with the given ID?
int unshare()
Convert any modified nodes to shared.
void visitLeaves(std::function< void(boost::intrusive_ptr< SHAMapItem const > const &)> const &) const
Visit every leaf node in this SHAMap.
bool updateGiveItem(SHAMapNodeType type, boost::intrusive_ptr< SHAMapItem const > item)
SHAMapType const type_
Definition SHAMap.h:130
SHAMapTreeNode * descendAsync(SHAMapInnerNode *parent, int branch, SHAMapSyncFilter const *filter, bool &pending, descendCallback &&) const
SHAMap()=delete
void dirtyUp(SharedPtrNodeStack &stack, uint256 const &target, SHAMapTreeNodePtr terminal)
Update hashes up to the root.
std::stack< std::pair< SHAMapTreeNodePtr, SHAMapNodeID > > SharedPtrNodeStack
Definition SHAMap.h:423
ConstIterator upperBound(uint256 const &id) const
Find the first item after the given item.
SHAMapAddNode addKnownNode(SHAMapNodeID const &nodeID, SHAMapTreeNodePtr treeNode, SHAMapSyncFilter const *filter)
Add a known node at a specific position in the SHAMap during synchronization.
void canonicalize(SHAMapHash const &hash, SHAMapTreeNodePtr &) const
bool hasLeafNode(uint256 const &tag, SHAMapHash const &hash) const
Does this map have this leaf node?
void setImmutable()
Definition SHAMap.h:647
SHAMapTreeNodePtr fetchNodeNT(SHAMapHash const &hash) const
void clearSynching()
Definition SHAMap.h:666
SHAMapTreeNodePtr descendNoStore(SHAMapInnerNode &, int branch) const
SHAMapTreeNodePtr checkFilter(SHAMapHash const &hash, SHAMapSyncFilter const *filter) const
SHAMapLeafNode * findKey(uint256 const &id) const
Return nullptr if key not found.
bool addGiveItem(SHAMapNodeType type, boost::intrusive_ptr< SHAMapItem const > item)
SHAMapTreeNodePtr root_
Definition SHAMap.h:128
ConstIterator end() const
Definition SHAMap.h:799
SHAMapTreeNodePtr writeNode(NodeObjectType t, SHAMapTreeNodePtr node) const
write and canonicalize modified node
std::function< void(SHAMapTreeNodePtr, SHAMapHash const &)> descendCallback
Definition SHAMap.h:515
intr_ptr::SharedPtr< Node > preFlushNode(intr_ptr::SharedPtr< Node > node) const
prepare a node to be modified before flushing
intr_ptr::SharedPtr< Node > unshareNode(intr_ptr::SharedPtr< Node >, SHAMapNodeID const &nodeID)
Unshare the node, allowing it to be modified.
boost::intrusive_ptr< SHAMapItem const > const & onlyBelow(SHAMapTreeNode *) const
If there is only one leaf below this node, get its contents.
std::uint32_t ledgerSeq_
The sequence of the ledger that this map references, if any.
Definition SHAMap.h:126
int walkSubTree(bool doWrite, NodeObjectType t)
SHAMapHash getHash() const
ConstIterator begin() const
Definition SHAMap.h:793
void visitNodes(std::function< bool(SHAMapTreeNode &)> const &function) const
Visit every node in this SHAMap.
bool delItem(uint256 const &id)
SHAMapTreeNode * descendThrow(SHAMapInnerNode *, int branch) const
bool walkBranch(SHAMapTreeNode *node, boost::intrusive_ptr< SHAMapItem const > const &otherMapItem, bool isFirstMap, Delta &differences, int &maxCount) const
SHAMapLeafNode const * peekFirstItem(SharedPtrNodeStack &stack) const
STL namespace.
SharedIntrusive< T > SharedPtr
Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.
Definition algorithm.h:5
intr_ptr::SharedPtr< SHAMapTreeNode > SHAMapTreeNodePtr
constexpr bool operator==(BaseUInt< Bits, Tag > const &lhs, BaseUInt< Bits, Tag > const &rhs)
Definition base_uint.h:606
NodeObjectType
The types of node objects.
Definition NodeObject.h:18
SHAMapState
Describes the current state of a given SHAMap.
Definition SHAMap.h:43
@ Immutable
The map is set in stone and cannot be changed.
Definition SHAMap.h:56
@ Invalid
The map is known to not be valid.
Definition SHAMap.h:70
@ Synching
The map's hash is fixed but valid nodes may be missing and can be added.
Definition SHAMap.h:63
@ Modifying
The map is in flux and objects can be added and removed.
Definition SHAMap.h:49
std::vector< unsigned char > Blob
Storage for linear binary data.
Definition Blob.h:11
BaseUInt< 256 > uint256
Definition base_uint.h:580
@ Invalid
Timely, but invalid signature.
Definition Manifest.h:329
A SHAMap is both a radix tree with a fan-out of 16 and a Merkle tree.
Definition SHAMap.h:103
SHAMapNodeID nodeID
Definition SHAMap.h:104
std::set< SHAMapHash > missingHashes
Definition SHAMap.h:578
std::vector< DeferredNode > finishedReads
Definition SHAMap.h:605
MissingNodes & operator=(MissingNodes const &)=delete
std::vector< std::pair< SHAMapNodeID, uint256 > > missingNodes
Definition SHAMap.h:577
MissingNodes(int max, SHAMapSyncFilter const *filter, int maxDefer, std::uint32_t generation)
Definition SHAMap.h:611
std::uint32_t generation
Definition SHAMap.h:574
MissingNodes(MissingNodes const &)=delete
SHAMapSyncFilter const * filter
Definition SHAMap.h:572
std::map< SHAMapInnerNode *, SHAMapNodeID > resumes
Definition SHAMap.h:609
std::tuple< SHAMapInnerNode *, SHAMapNodeID, int, int, bool > StackEntry
Definition SHAMap.h:581
std::stack< StackEntry, std::deque< StackEntry > > stack
Definition SHAMap.h:593
std::tuple< SHAMapInnerNode *, SHAMapNodeID, int, SHAMapTreeNodePtr > DeferredNode
Definition SHAMap.h:596
std::condition_variable deferCondVar
Definition SHAMap.h:604