xrpld
Loading...
Searching...
No Matches
xrpl::tests Namespace Reference

Classes

struct  Barrier
class  cluster_test
struct  DeepChain
 A chain of inner nodes in wire form, from the root down to one deepest node, each with one real child and, under withDecoys(), an unresolvable second one. More...
struct  InnerChild
 One child of an inner node a test assembles by hand. More...
class  LedgerNodeHelpers_test
struct  SHAMapBackingMode
class  SHAMapPathProof
class  SHAMapSyncTest
class  SHAMapTest
class  SHAMapTraversal
class  TestNodeFamily

Functions

 BEAST_DEFINE_TESTSUITE (LedgerNodeHelpers, app, xrpl)
 BEAST_DEFINE_TESTSUITE (cluster, overlay, xrpl)
 TEST (IntrusiveSharedTest, ref_counts_on_a_bare_object)
 TEST (IntrusiveSharedTest, strong_and_weak_containers_track_liveness)
 TEST (IntrusiveSharedTest, a_weak_pointer_cannot_revive_a_partially_deleted_object)
 TEST (IntrusiveSharedTest, shared_weak_union_converts_between_strong_and_weak)
 TEST (IntrusiveSharedTest, shared_weak_union_assignment)
 TEST (IntrusiveSharedTest, partial_delete)
 TEST (IntrusiveSharedTest, convert_last_strong_to_weak)
 TEST (IntrusiveSharedTest, multithreaded_convert_to_weak_partial_delete)
 TEST (IntrusiveSharedTest, destructor)
 TEST (IntrusiveSharedTest, multithreaded_clear_mixed_variant)
 TEST (IntrusiveSharedTest, multithreaded_clear_mixed_union)
 TEST (IntrusiveSharedTest, multithreaded_locking_weak)
 TEST_F (HashRouterTest, clear_flags_clears_only_the_named_flags)
 TEST_F (HashRouterTest, clear_flags_reports_when_nothing_changes)
 TEST (FetchPackTest, construct_table)
SHAMapTreeNodePtr makeFullInnerNode (std::vector< InnerChild > const &children)
 Assemble an inner node in the wire format's full form.
SHAMapTreeNodePtr makeCompressedInnerNode (std::vector< InnerChild > const &children)
 Assemble an inner node in the wire format's compressed form.
bool operator!= (SHAMapItem const &a, SHAMapItem const &b)
std::string shamapBackingModeName (::testing::TestParamInfo< SHAMapBackingMode > const &info)
 TEST_P (SHAMapTest, add_and_traverse_in_key_order)
 TEST_P (SHAMapTest, traverse_after_add_and_delete)
 TEST_P (SHAMapTest, a_snapshot_is_unaffected_by_later_edits)
 TEST_P (SHAMapTest, the_hash_after_each_add_is_undone_by_the_matching_delete)
 TEST_P (SHAMapTest, iteration_yields_keys_in_ascending_order)
 INSTANTIATE_TEST_SUITE_P (BackingMode, SHAMapTest, ::testing::Values(kBackedMode, kUnbackedMode), shamapBackingModeName)
 TEST_F (SHAMapTraversal, forward_iteration_visits_every_key_in_order)
 TEST_F (SHAMapTraversal, upper_bound_walks_the_whole_map)
 TEST_F (SHAMapTraversal, lower_bound_walks_the_whole_map)
 TEST_F (SHAMapTraversal, bounds_agree_with_iteration_for_absent_keys)
 TEST_F (SHAMapTraversal, bounds_on_empty_map_return_end)
 TEST_F (SHAMapTraversal, bounds_on_single_item_map_use_the_leaf_below_the_root)
 TEST_F (SHAMapTraversal, iteration_survives_deletions)
 TEST_F (SHAMapTraversal, iteration_survives_a_collapsed_inner_node)
 TEST_F (SHAMapTraversal, forward_iteration_visits_every_key_in_order_at_leaf_depth)
 TEST_F (SHAMapTraversal, upper_bound_walks_the_whole_map_at_leaf_depth)
 TEST_F (SHAMapTraversal, lower_bound_walks_the_whole_map_at_leaf_depth)
 TEST_F (SHAMapTraversal, bounds_agree_with_iteration_for_absent_keys_at_leaf_depth)
 TEST_F (SHAMapTraversal, iteration_survives_deletions_at_leaf_depth)
 TEST_F (SHAMapPathProof, verify_proof_path)
 TEST_F (SHAMapPathProof, legitimate_deep_path_is_sixty_five_elements)
 TEST_F (SHAMapPathProof, all_inner_path_at_leaf_depth_is_rejected)
static std::pair< std::vector< Blob >, UInt256 > forgeRootOverLeaf (Blob const &leafBlob, UInt256 const &key)
 Wrap a leaf blob in a forged root inner node whose branch for key carries that leaf's hash.
 TEST_F (SHAMapPathProof, substituted_leaf_for_other_key_is_rejected)
 TEST (SHAMapAddNode, get_names_every_non_empty_count)
 TEST (SHAMapAddNode, counts_and_verdicts_agree)
constexpr UInt256 kTestKey ("b92891fe4ef6cee585fdc6fda1e09eb4d386363158ec3321b8123e5a772c6ca8")
 TEST (SHAMapNodeIDTest, root_is_prefix_of_every_key)
 TEST (SHAMapNodeIDTest, child_id_is_prefix_of_keys_in_that_branch)
 TEST (SHAMapNodeIDTest, wrong_branch_is_not_prefix_of_key)
 TEST (SHAMapNodeIDTest, prefix_check_is_depth_sensitive)
 TEST (SHAMapNodeIDTest, leaf_id_from_key_is_prefix_of_that_key)
 TEST (SHAMapNodeIDTest, create_id_masks_key_to_depth)
 TEST (SHAMapNodeIDTest, child_of_leaf_depth_id_throws)
 TEST (SHAMapNodeIDDeathTest, out_of_range_depth_is_clamped)
 TEST (SHAMapNodeIDDeathTest, select_branch_clamps_leaf_depth)
 TEST (SHAMapNodeIDTest, deserialize_rejects_out_of_range_depth)
static Rules noAmendments ()
 Rules with no amendments enabled.
static ::testing::AssertionResult tallyIs (SHAMapAddNode const &san, int good, int bad, int duplicate)
 Whether a verdict carries exactly the given counts.
 TEST_F (SHAMapSyncTest, inner_node_at_leaf_depth)
 TEST_F (SHAMapSyncTest, add_known_node_accepts_leaf_at_leaf_depth)
 TEST_F (SHAMapSyncTest, node_that_cannot_be_hooked_is_bad_data)
 TEST_F (SHAMapSyncTest, add_root_node_judges_the_hash_asked_for)
 TEST_F (SHAMapSyncTest, map_invalidating_node_is_judged_before_the_cache_is_read)
 TEST_F (SHAMapSyncTest, invalid_tx_map_blocks_immutable_ledger)
 TEST_F (SHAMapSyncTest, invalid_state_map_blocks_immutable_ledger)
 TEST_F (SHAMapSyncTest, refused_settle_leaves_the_header_alone)
 TEST_F (SHAMapSyncTest, invalid_state_is_terminal)
 TEST_F (SHAMapSyncTest, clear_synching_leaves_an_immutable_map_immutable)
 TEST_F (SHAMapSyncTest, snapshot_of_invalid_map_stays_invalid)
 TEST_F (SHAMapSyncTest, get_missing_nodes_refuses_invalid_map)
 TEST_F (SHAMapSyncTest, get_missing_nodes_rejects_inner_node_at_leaf_depth)
 TEST_F (SHAMapSyncTest, get_missing_nodes_rejects_inner_node_at_leaf_depth_before_the_cache_is_read)
 TEST_F (SHAMapSyncTest, get_missing_nodes_drains_posted_reads_when_invalidated)
 TEST_F (SHAMapSyncTest, get_missing_nodes_accepts_inner_node_above_leaf_depth)
 TEST_F (SHAMapSyncTest, get_missing_nodes_accepts_leaf_at_leaf_depth)
 TEST_F (SHAMapSyncTest, add_root_node_leaves_invalid_map_invalid)
 TEST_F (SHAMapSyncTest, invalid_state_survives_concurrent_set_immutable)
 TEST_F (SHAMapSyncTest, full_flag_is_withdrawn_once_by_concurrent_readers)
 TEST_F (SHAMapSyncTest, sync_filter_is_told_the_ledger_sequence)
 TEST_F (SHAMapSyncTest, ledger_set_full_publishes_the_ledger_sequence)
 TEST_F (SHAMapSyncTest, ledger_set_full_publishes_the_sequence_before_the_flag)
 TEST_F (SHAMapSyncTest, sync)
 TEST_F (SHAMapSyncTest, add_known_node_reports_duplicate_once_a_map_stops_synching)

Variables

constexpr SHAMapBackingMode kBackedMode {.backed = true, .testName = "backed"}
constexpr SHAMapBackingMode kUnbackedMode {.backed = false, .testName = "unbacked"}
static constexpr int kMaxNodesPerRequest = 2048

Function Documentation

◆ BEAST_DEFINE_TESTSUITE() [1/2]

xrpl::tests::BEAST_DEFINE_TESTSUITE ( LedgerNodeHelpers ,
app ,
xrpl  )

◆ BEAST_DEFINE_TESTSUITE() [2/2]

xrpl::tests::BEAST_DEFINE_TESTSUITE ( cluster ,
overlay ,
xrpl  )

◆ TEST() [1/25]

xrpl::tests::TEST ( IntrusiveSharedTest ,
ref_counts_on_a_bare_object  )

Definition at line 193 of file IntrusiveShared.cpp.

◆ TEST() [2/25]

xrpl::tests::TEST ( IntrusiveSharedTest ,
strong_and_weak_containers_track_liveness  )

Definition at line 211 of file IntrusiveShared.cpp.

◆ TEST() [3/25]

xrpl::tests::TEST ( IntrusiveSharedTest ,
a_weak_pointer_cannot_revive_a_partially_deleted_object  )

Definition at line 259 of file IntrusiveShared.cpp.

◆ TEST() [4/25]

xrpl::tests::TEST ( IntrusiveSharedTest ,
shared_weak_union_converts_between_strong_and_weak  )

Definition at line 285 of file IntrusiveShared.cpp.

◆ TEST() [5/25]

xrpl::tests::TEST ( IntrusiveSharedTest ,
shared_weak_union_assignment  )

Definition at line 319 of file IntrusiveShared.cpp.

◆ TEST() [6/25]

xrpl::tests::TEST ( IntrusiveSharedTest ,
partial_delete  )

Definition at line 374 of file IntrusiveShared.cpp.

◆ TEST() [7/25]

xrpl::tests::TEST ( IntrusiveSharedTest ,
convert_last_strong_to_weak  )

Definition at line 449 of file IntrusiveShared.cpp.

◆ TEST() [8/25]

xrpl::tests::TEST ( IntrusiveSharedTest ,
multithreaded_convert_to_weak_partial_delete  )

Definition at line 468 of file IntrusiveShared.cpp.

◆ TEST() [9/25]

xrpl::tests::TEST ( IntrusiveSharedTest ,
destructor  )

Definition at line 538 of file IntrusiveShared.cpp.

◆ TEST() [10/25]

xrpl::tests::TEST ( IntrusiveSharedTest ,
multithreaded_clear_mixed_variant  )

Definition at line 593 of file IntrusiveShared.cpp.

◆ TEST() [11/25]

xrpl::tests::TEST ( IntrusiveSharedTest ,
multithreaded_clear_mixed_union  )

Definition at line 729 of file IntrusiveShared.cpp.

◆ TEST() [12/25]

xrpl::tests::TEST ( IntrusiveSharedTest ,
multithreaded_locking_weak  )

Definition at line 883 of file IntrusiveShared.cpp.

◆ TEST_F() [1/44]

xrpl::tests::TEST_F ( HashRouterTest ,
clear_flags_clears_only_the_named_flags  )

Definition at line 23 of file tests/libxrpl/core/HashRouter.cpp.

◆ TEST_F() [2/44]

xrpl::tests::TEST_F ( HashRouterTest ,
clear_flags_reports_when_nothing_changes  )

Definition at line 39 of file tests/libxrpl/core/HashRouter.cpp.

◆ TEST() [13/25]

xrpl::tests::TEST ( FetchPackTest ,
construct_table  )

Definition at line 13 of file FetchPack.cpp.

◆ makeFullInnerNode()

SHAMapTreeNodePtr xrpl::tests::makeFullInnerNode ( std::vector< InnerChild > const & children)
nodiscard

Assemble an inner node in the wire format's full form.

A full inner node is all 16 branch hashes back to back in branch order, followed by the wire type byte. A branch absent from children, or given a zero hash, yields an empty branch, since the parser derives which branches exist from which hashes are non-zero. The node's hash is already correct, since makeFromWire() computes it.

Parameters
childrenThe branch and hash of each child to record. Throws if a branch is at or above SHAMapInnerNode::kBranchFactor, or if one branch is named twice.
Returns
The node, or nullptr if the bytes do not parse.

Definition at line 42 of file InnerNode.h.

◆ makeCompressedInnerNode()

SHAMapTreeNodePtr xrpl::tests::makeCompressedInnerNode ( std::vector< InnerChild > const & children)
nodiscard

Assemble an inner node in the wire format's compressed form.

A compressed inner node is one 33-byte chunk per child, each a hash followed by the branch it sits on, and then the wire type byte. Its hash is already correct, for the same reason makeFullInnerNode()'s is.

Nothing is checked here, unlike in makeFullInnerNode(). The branch travels as one byte, so any value up to 255 reaches the parser, which refuses a branch at or above SHAMapInnerNode::kBranchFactor and lets a repeated branch overwrite the hash recorded for it.

Parameters
childrenThe branch and hash of each child to record.
Returns
The node, or nullptr if the bytes do not parse.

Definition at line 87 of file InnerNode.h.

◆ operator!=()

bool xrpl::tests::operator!= ( SHAMapItem const & a,
SHAMapItem const & b )

Definition at line 91 of file tests/libxrpl/shamap/SHAMap.cpp.

◆ shamapBackingModeName()

std::string xrpl::tests::shamapBackingModeName ( ::testing::TestParamInfo< SHAMapBackingMode > const & info)
nodiscard

Definition at line 106 of file tests/libxrpl/shamap/SHAMap.cpp.

◆ TEST_P() [1/5]

xrpl::tests::TEST_P ( SHAMapTest ,
add_and_traverse_in_key_order  )

Definition at line 160 of file tests/libxrpl/shamap/SHAMap.cpp.

◆ TEST_P() [2/5]

xrpl::tests::TEST_P ( SHAMapTest ,
traverse_after_add_and_delete  )

Definition at line 183 of file tests/libxrpl/shamap/SHAMap.cpp.

◆ TEST_P() [3/5]

xrpl::tests::TEST_P ( SHAMapTest ,
a_snapshot_is_unaffected_by_later_edits  )

Definition at line 206 of file tests/libxrpl/shamap/SHAMap.cpp.

◆ TEST_P() [4/5]

xrpl::tests::TEST_P ( SHAMapTest ,
the_hash_after_each_add_is_undone_by_the_matching_delete  )

Definition at line 238 of file tests/libxrpl/shamap/SHAMap.cpp.

◆ TEST_P() [5/5]

xrpl::tests::TEST_P ( SHAMapTest ,
iteration_yields_keys_in_ascending_order  )

Definition at line 286 of file tests/libxrpl/shamap/SHAMap.cpp.

◆ INSTANTIATE_TEST_SUITE_P()

xrpl::tests::INSTANTIATE_TEST_SUITE_P ( BackingMode ,
SHAMapTest ,
::testing::Values(kBackedMode, kUnbackedMode) ,
shamapBackingModeName  )

◆ TEST_F() [3/44]

xrpl::tests::TEST_F ( SHAMapTraversal ,
forward_iteration_visits_every_key_in_order  )

Definition at line 375 of file tests/libxrpl/shamap/SHAMap.cpp.

◆ TEST_F() [4/44]

xrpl::tests::TEST_F ( SHAMapTraversal ,
upper_bound_walks_the_whole_map  )

Definition at line 390 of file tests/libxrpl/shamap/SHAMap.cpp.

◆ TEST_F() [5/44]

xrpl::tests::TEST_F ( SHAMapTraversal ,
lower_bound_walks_the_whole_map  )

Definition at line 409 of file tests/libxrpl/shamap/SHAMap.cpp.

◆ TEST_F() [6/44]

xrpl::tests::TEST_F ( SHAMapTraversal ,
bounds_agree_with_iteration_for_absent_keys  )

Definition at line 428 of file tests/libxrpl/shamap/SHAMap.cpp.

◆ TEST_F() [7/44]

xrpl::tests::TEST_F ( SHAMapTraversal ,
bounds_on_empty_map_return_end  )

Definition at line 503 of file tests/libxrpl/shamap/SHAMap.cpp.

◆ TEST_F() [8/44]

xrpl::tests::TEST_F ( SHAMapTraversal ,
bounds_on_single_item_map_use_the_leaf_below_the_root  )

Definition at line 521 of file tests/libxrpl/shamap/SHAMap.cpp.

◆ TEST_F() [9/44]

xrpl::tests::TEST_F ( SHAMapTraversal ,
iteration_survives_deletions  )

Definition at line 549 of file tests/libxrpl/shamap/SHAMap.cpp.

◆ TEST_F() [10/44]

xrpl::tests::TEST_F ( SHAMapTraversal ,
iteration_survives_a_collapsed_inner_node  )

Definition at line 584 of file tests/libxrpl/shamap/SHAMap.cpp.

◆ TEST_F() [11/44]

xrpl::tests::TEST_F ( SHAMapTraversal ,
forward_iteration_visits_every_key_in_order_at_leaf_depth  )

Definition at line 634 of file tests/libxrpl/shamap/SHAMap.cpp.

◆ TEST_F() [12/44]

xrpl::tests::TEST_F ( SHAMapTraversal ,
upper_bound_walks_the_whole_map_at_leaf_depth  )

Definition at line 649 of file tests/libxrpl/shamap/SHAMap.cpp.

◆ TEST_F() [13/44]

xrpl::tests::TEST_F ( SHAMapTraversal ,
lower_bound_walks_the_whole_map_at_leaf_depth  )

Definition at line 668 of file tests/libxrpl/shamap/SHAMap.cpp.

◆ TEST_F() [14/44]

xrpl::tests::TEST_F ( SHAMapTraversal ,
bounds_agree_with_iteration_for_absent_keys_at_leaf_depth  )

Definition at line 687 of file tests/libxrpl/shamap/SHAMap.cpp.

◆ TEST_F() [15/44]

xrpl::tests::TEST_F ( SHAMapTraversal ,
iteration_survives_deletions_at_leaf_depth  )

Definition at line 738 of file tests/libxrpl/shamap/SHAMap.cpp.

◆ TEST_F() [16/44]

xrpl::tests::TEST_F ( SHAMapPathProof ,
verify_proof_path  )

Definition at line 778 of file tests/libxrpl/shamap/SHAMap.cpp.

◆ TEST_F() [17/44]

xrpl::tests::TEST_F ( SHAMapPathProof ,
legitimate_deep_path_is_sixty_five_elements  )

Definition at line 853 of file tests/libxrpl/shamap/SHAMap.cpp.

◆ TEST_F() [18/44]

xrpl::tests::TEST_F ( SHAMapPathProof ,
all_inner_path_at_leaf_depth_is_rejected  )

Definition at line 887 of file tests/libxrpl/shamap/SHAMap.cpp.

◆ forgeRootOverLeaf()

std::pair< std::vector< Blob >, UInt256 > xrpl::tests::forgeRootOverLeaf ( Blob const & leafBlob,
UInt256 const & key )
staticnodiscard

Wrap a leaf blob in a forged root inner node whose branch for key carries that leaf's hash.

The resulting two-element path hash-chains for key no matter which leaf sits at the bottom, which is exactly the substitution a peer could attempt.

Parameters
leafBlobthe wire form of the leaf to place at the bottom of the path.
keythe key the forged path claims to prove.
Returns
the path (deepest element first) and the forged root hash, or an empty path if the leaf blob does not parse.

Definition at line 930 of file tests/libxrpl/shamap/SHAMap.cpp.

◆ TEST_F() [19/44]

xrpl::tests::TEST_F ( SHAMapPathProof ,
substituted_leaf_for_other_key_is_rejected  )

Definition at line 954 of file tests/libxrpl/shamap/SHAMap.cpp.

◆ TEST() [14/25]

xrpl::tests::TEST ( SHAMapAddNode ,
get_names_every_non_empty_count  )

Definition at line 9 of file SHAMapAddNode.cpp.

◆ TEST() [15/25]

xrpl::tests::TEST ( SHAMapAddNode ,
counts_and_verdicts_agree  )

Definition at line 30 of file SHAMapAddNode.cpp.

◆ kTestKey()

UInt256 xrpl::tests::kTestKey ( "b92891fe4ef6cee585fdc6fda1e09eb4d386363158ec3321b8123e5a772c6ca8" )
constexpr

◆ TEST() [16/25]

xrpl::tests::TEST ( SHAMapNodeIDTest ,
root_is_prefix_of_every_key  )

Definition at line 17 of file tests/libxrpl/shamap/SHAMapNodeID.cpp.

◆ TEST() [17/25]

xrpl::tests::TEST ( SHAMapNodeIDTest ,
child_id_is_prefix_of_keys_in_that_branch  )

Definition at line 25 of file tests/libxrpl/shamap/SHAMapNodeID.cpp.

◆ TEST() [18/25]

xrpl::tests::TEST ( SHAMapNodeIDTest ,
wrong_branch_is_not_prefix_of_key  )

Definition at line 38 of file tests/libxrpl/shamap/SHAMapNodeID.cpp.

◆ TEST() [19/25]

xrpl::tests::TEST ( SHAMapNodeIDTest ,
prefix_check_is_depth_sensitive  )

Definition at line 54 of file tests/libxrpl/shamap/SHAMapNodeID.cpp.

◆ TEST() [20/25]

xrpl::tests::TEST ( SHAMapNodeIDTest ,
leaf_id_from_key_is_prefix_of_that_key  )

Definition at line 73 of file tests/libxrpl/shamap/SHAMapNodeID.cpp.

◆ TEST() [21/25]

xrpl::tests::TEST ( SHAMapNodeIDTest ,
create_id_masks_key_to_depth  )

Definition at line 83 of file tests/libxrpl/shamap/SHAMapNodeID.cpp.

◆ TEST() [22/25]

xrpl::tests::TEST ( SHAMapNodeIDTest ,
child_of_leaf_depth_id_throws  )

Definition at line 96 of file tests/libxrpl/shamap/SHAMapNodeID.cpp.

◆ TEST() [23/25]

xrpl::tests::TEST ( SHAMapNodeIDDeathTest ,
out_of_range_depth_is_clamped  )

Definition at line 103 of file tests/libxrpl/shamap/SHAMapNodeID.cpp.

◆ TEST() [24/25]

xrpl::tests::TEST ( SHAMapNodeIDDeathTest ,
select_branch_clamps_leaf_depth  )

Definition at line 140 of file tests/libxrpl/shamap/SHAMapNodeID.cpp.

◆ TEST() [25/25]

xrpl::tests::TEST ( SHAMapNodeIDTest ,
deserialize_rejects_out_of_range_depth  )

Definition at line 168 of file tests/libxrpl/shamap/SHAMapNodeID.cpp.

◆ noAmendments()

Rules xrpl::tests::noAmendments ( )
staticnodiscard

Rules with no amendments enabled.

Rules keeps a reference to the preset set rather than a copy, so the set is a function-local static that outlives every Rules built from it.

Returns
The rules.

Definition at line 59 of file tests/libxrpl/shamap/SHAMapSync.cpp.

◆ tallyIs()

::testing::AssertionResult xrpl::tests::tallyIs ( SHAMapAddNode const & san,
int good,
int bad,
int duplicate )
staticnodiscard

Whether a verdict carries exactly the given counts.

The counts rather than get(): that string is a log format, not an API. It is pinned once, in the SHAMapAddNode tests, and read here only to describe a failure.

Parameters
sanThe verdict to check.
goodHow many nodes the batch should have hooked in.
badHow many it should have rejected.
duplicateHow many it should have already held.
Returns
Whether the verdict matches, naming the actual tally if it does not.

Definition at line 79 of file tests/libxrpl/shamap/SHAMapSync.cpp.

◆ TEST_F() [20/44]

xrpl::tests::TEST_F ( SHAMapSyncTest ,
inner_node_at_leaf_depth  )

Definition at line 292 of file tests/libxrpl/shamap/SHAMapSync.cpp.

◆ TEST_F() [21/44]

xrpl::tests::TEST_F ( SHAMapSyncTest ,
add_known_node_accepts_leaf_at_leaf_depth  )

Definition at line 315 of file tests/libxrpl/shamap/SHAMapSync.cpp.

◆ TEST_F() [22/44]

xrpl::tests::TEST_F ( SHAMapSyncTest ,
node_that_cannot_be_hooked_is_bad_data  )

Definition at line 342 of file tests/libxrpl/shamap/SHAMapSync.cpp.

◆ TEST_F() [23/44]

xrpl::tests::TEST_F ( SHAMapSyncTest ,
add_root_node_judges_the_hash_asked_for  )

Definition at line 380 of file tests/libxrpl/shamap/SHAMapSync.cpp.

◆ TEST_F() [24/44]

xrpl::tests::TEST_F ( SHAMapSyncTest ,
map_invalidating_node_is_judged_before_the_cache_is_read  )

Definition at line 424 of file tests/libxrpl/shamap/SHAMapSync.cpp.

◆ TEST_F() [25/44]

xrpl::tests::TEST_F ( SHAMapSyncTest ,
invalid_tx_map_blocks_immutable_ledger  )

Definition at line 451 of file tests/libxrpl/shamap/SHAMapSync.cpp.

◆ TEST_F() [26/44]

xrpl::tests::TEST_F ( SHAMapSyncTest ,
invalid_state_map_blocks_immutable_ledger  )

Definition at line 478 of file tests/libxrpl/shamap/SHAMapSync.cpp.

◆ TEST_F() [27/44]

xrpl::tests::TEST_F ( SHAMapSyncTest ,
refused_settle_leaves_the_header_alone  )

Definition at line 507 of file tests/libxrpl/shamap/SHAMapSync.cpp.

◆ TEST_F() [28/44]

xrpl::tests::TEST_F ( SHAMapSyncTest ,
invalid_state_is_terminal  )

Definition at line 542 of file tests/libxrpl/shamap/SHAMapSync.cpp.

◆ TEST_F() [29/44]

xrpl::tests::TEST_F ( SHAMapSyncTest ,
clear_synching_leaves_an_immutable_map_immutable  )

Definition at line 576 of file tests/libxrpl/shamap/SHAMapSync.cpp.

◆ TEST_F() [30/44]

xrpl::tests::TEST_F ( SHAMapSyncTest ,
snapshot_of_invalid_map_stays_invalid  )

Definition at line 592 of file tests/libxrpl/shamap/SHAMapSync.cpp.

◆ TEST_F() [31/44]

xrpl::tests::TEST_F ( SHAMapSyncTest ,
get_missing_nodes_refuses_invalid_map  )

Serve a node as ChainFilter does, and count the request.

Parameters
hashThe hash of the node asked for.
Returns
The node's prefixed form, or nullopt when it is not served.

Definition at line 626 of file tests/libxrpl/shamap/SHAMapSync.cpp.

◆ TEST_F() [32/44]

xrpl::tests::TEST_F ( SHAMapSyncTest ,
get_missing_nodes_rejects_inner_node_at_leaf_depth  )

Definition at line 676 of file tests/libxrpl/shamap/SHAMapSync.cpp.

◆ TEST_F() [33/44]

xrpl::tests::TEST_F ( SHAMapSyncTest ,
get_missing_nodes_rejects_inner_node_at_leaf_depth_before_the_cache_is_read  )

Definition at line 709 of file tests/libxrpl/shamap/SHAMapSync.cpp.

◆ TEST_F() [34/44]

xrpl::tests::TEST_F ( SHAMapSyncTest ,
get_missing_nodes_drains_posted_reads_when_invalidated  )

Definition at line 738 of file tests/libxrpl/shamap/SHAMapSync.cpp.

◆ TEST_F() [35/44]

xrpl::tests::TEST_F ( SHAMapSyncTest ,
get_missing_nodes_accepts_inner_node_above_leaf_depth  )

Definition at line 772 of file tests/libxrpl/shamap/SHAMapSync.cpp.

◆ TEST_F() [36/44]

xrpl::tests::TEST_F ( SHAMapSyncTest ,
get_missing_nodes_accepts_leaf_at_leaf_depth  )

Definition at line 797 of file tests/libxrpl/shamap/SHAMapSync.cpp.

◆ TEST_F() [37/44]

xrpl::tests::TEST_F ( SHAMapSyncTest ,
add_root_node_leaves_invalid_map_invalid  )

Definition at line 820 of file tests/libxrpl/shamap/SHAMapSync.cpp.

◆ TEST_F() [38/44]

xrpl::tests::TEST_F ( SHAMapSyncTest ,
invalid_state_survives_concurrent_set_immutable  )

Definition at line 850 of file tests/libxrpl/shamap/SHAMapSync.cpp.

◆ TEST_F() [39/44]

xrpl::tests::TEST_F ( SHAMapSyncTest ,
full_flag_is_withdrawn_once_by_concurrent_readers  )

Definition at line 904 of file tests/libxrpl/shamap/SHAMapSync.cpp.

◆ TEST_F() [40/44]

xrpl::tests::TEST_F ( SHAMapSyncTest ,
sync_filter_is_told_the_ledger_sequence  )

Definition at line 936 of file tests/libxrpl/shamap/SHAMapSync.cpp.

◆ TEST_F() [41/44]

xrpl::tests::TEST_F ( SHAMapSyncTest ,
ledger_set_full_publishes_the_ledger_sequence  )

Definition at line 989 of file tests/libxrpl/shamap/SHAMapSync.cpp.

◆ TEST_F() [42/44]

xrpl::tests::TEST_F ( SHAMapSyncTest ,
ledger_set_full_publishes_the_sequence_before_the_flag  )

Definition at line 1032 of file tests/libxrpl/shamap/SHAMapSync.cpp.

◆ TEST_F() [43/44]

xrpl::tests::TEST_F ( SHAMapSyncTest ,
sync  )

Definition at line 1093 of file tests/libxrpl/shamap/SHAMapSync.cpp.

◆ TEST_F() [44/44]

xrpl::tests::TEST_F ( SHAMapSyncTest ,
add_known_node_reports_duplicate_once_a_map_stops_synching  )

Definition at line 1196 of file tests/libxrpl/shamap/SHAMapSync.cpp.

Variable Documentation

◆ kBackedMode

SHAMapBackingMode xrpl::tests::kBackedMode {.backed = true, .testName = "backed"}
constexpr

Definition at line 102 of file tests/libxrpl/shamap/SHAMap.cpp.

◆ kUnbackedMode

SHAMapBackingMode xrpl::tests::kUnbackedMode {.backed = false, .testName = "unbacked"}
constexpr

Definition at line 103 of file tests/libxrpl/shamap/SHAMap.cpp.

◆ kMaxNodesPerRequest

int xrpl::tests::kMaxNodesPerRequest = 2048
staticconstexpr

Definition at line 48 of file tests/libxrpl/shamap/SHAMapSync.cpp.