@@ -48,7 +48,7 @@ BOOST_FIXTURE_TEST_CASE(package_sanitization_tests, TestChain100Setup)
48
48
package_too_many.emplace_back (create_placeholder_tx (1 , 1 ));
49
49
}
50
50
PackageValidationState state_too_many;
51
- BOOST_CHECK (!CheckPackage (package_too_many, state_too_many, /* require_sorted=*/ true ));
51
+ BOOST_CHECK (!IsWellFormedPackage (package_too_many, state_too_many, /* require_sorted=*/ true ));
52
52
BOOST_CHECK_EQUAL (state_too_many.GetResult (), PackageValidationResult::PCKG_POLICY);
53
53
BOOST_CHECK_EQUAL (state_too_many.GetRejectReason (), " package-too-many-transactions" );
54
54
@@ -63,7 +63,7 @@ BOOST_FIXTURE_TEST_CASE(package_sanitization_tests, TestChain100Setup)
63
63
}
64
64
BOOST_CHECK (package_too_large.size () <= MAX_PACKAGE_COUNT);
65
65
PackageValidationState state_too_large;
66
- BOOST_CHECK (!CheckPackage (package_too_large, state_too_large, /* require_sorted=*/ true ));
66
+ BOOST_CHECK (!IsWellFormedPackage (package_too_large, state_too_large, /* require_sorted=*/ true ));
67
67
BOOST_CHECK_EQUAL (state_too_large.GetResult (), PackageValidationResult::PCKG_POLICY);
68
68
BOOST_CHECK_EQUAL (state_too_large.GetRejectReason (), " package-too-large" );
69
69
@@ -74,7 +74,7 @@ BOOST_FIXTURE_TEST_CASE(package_sanitization_tests, TestChain100Setup)
74
74
package_duplicate_txids_empty.emplace_back (MakeTransactionRef (empty_tx));
75
75
}
76
76
PackageValidationState state_duplicates;
77
- BOOST_CHECK (!CheckPackage (package_duplicate_txids_empty, state_duplicates, /* require_sorted=*/ true ));
77
+ BOOST_CHECK (!IsWellFormedPackage (package_duplicate_txids_empty, state_duplicates, /* require_sorted=*/ true ));
78
78
BOOST_CHECK_EQUAL (state_duplicates.GetResult (), PackageValidationResult::PCKG_POLICY);
79
79
BOOST_CHECK_EQUAL (state_duplicates.GetRejectReason (), " package-contains-duplicates" );
80
80
BOOST_CHECK (!IsConsistentPackage (package_duplicate_txids_empty));
@@ -93,7 +93,7 @@ BOOST_FIXTURE_TEST_CASE(package_sanitization_tests, TestChain100Setup)
93
93
// Transactions are considered sorted when they have no dependencies.
94
94
BOOST_CHECK (IsTopoSortedPackage (package_conflicts));
95
95
PackageValidationState state_conflicts;
96
- BOOST_CHECK (!CheckPackage (package_conflicts, state_conflicts, /* require_sorted=*/ true ));
96
+ BOOST_CHECK (!IsWellFormedPackage (package_conflicts, state_conflicts, /* require_sorted=*/ true ));
97
97
BOOST_CHECK_EQUAL (state_conflicts.GetResult (), PackageValidationResult::PCKG_POLICY);
98
98
BOOST_CHECK_EQUAL (state_conflicts.GetRejectReason (), " conflict-in-package" );
99
99
@@ -188,8 +188,8 @@ BOOST_FIXTURE_TEST_CASE(noncontextual_package_tests, TestChain100Setup)
188
188
CTransactionRef tx_child = MakeTransactionRef (mtx_child);
189
189
190
190
PackageValidationState state;
191
- BOOST_CHECK (CheckPackage ({tx_parent, tx_child}, state, /* require_sorted=*/ true ));
192
- BOOST_CHECK (!CheckPackage ({tx_child, tx_parent}, state, /* require_sorted=*/ true ));
191
+ BOOST_CHECK (IsWellFormedPackage ({tx_parent, tx_child}, state, /* require_sorted=*/ true ));
192
+ BOOST_CHECK (!IsWellFormedPackage ({tx_child, tx_parent}, state, /* require_sorted=*/ true ));
193
193
BOOST_CHECK_EQUAL (state.GetResult (), PackageValidationResult::PCKG_POLICY);
194
194
BOOST_CHECK_EQUAL (state.GetRejectReason (), " package-not-sorted" );
195
195
BOOST_CHECK (IsChildWithParents ({tx_parent, tx_child}));
@@ -217,7 +217,7 @@ BOOST_FIXTURE_TEST_CASE(noncontextual_package_tests, TestChain100Setup)
217
217
package.push_back (MakeTransactionRef (child));
218
218
219
219
PackageValidationState state;
220
- BOOST_CHECK (CheckPackage (package, state, /* require_sorted=*/ true ));
220
+ BOOST_CHECK (IsWellFormedPackage (package, state, /* require_sorted=*/ true ));
221
221
BOOST_CHECK (IsChildWithParents (package));
222
222
BOOST_CHECK (IsChildWithParentsTree (package));
223
223
@@ -255,8 +255,8 @@ BOOST_FIXTURE_TEST_CASE(noncontextual_package_tests, TestChain100Setup)
255
255
BOOST_CHECK (!IsChildWithParentsTree ({tx_parent, tx_parent_also_child, tx_child}));
256
256
// IsChildWithParents does not detect unsorted parents.
257
257
BOOST_CHECK (IsChildWithParents ({tx_parent_also_child, tx_parent, tx_child}));
258
- BOOST_CHECK (CheckPackage ({tx_parent, tx_parent_also_child, tx_child}, state, /* require_sorted=*/ true ));
259
- BOOST_CHECK (!CheckPackage ({tx_parent_also_child, tx_parent, tx_child}, state, /* require_sorted=*/ true ));
258
+ BOOST_CHECK (IsWellFormedPackage ({tx_parent, tx_parent_also_child, tx_child}, state, /* require_sorted=*/ true ));
259
+ BOOST_CHECK (!IsWellFormedPackage ({tx_parent_also_child, tx_parent, tx_child}, state, /* require_sorted=*/ true ));
260
260
BOOST_CHECK_EQUAL (state.GetResult (), PackageValidationResult::PCKG_POLICY);
261
261
BOOST_CHECK_EQUAL (state.GetRejectReason (), " package-not-sorted" );
262
262
}
0 commit comments