Remove some sprout tests

This commit is contained in:
Duke Leto
2021-01-23 22:53:32 -05:00
parent 0a99c80150
commit 1189208779

View File

@@ -60,9 +60,6 @@ public:
{ {
const std::map<uint256, bool>* mapToUse; const std::map<uint256, bool>* mapToUse;
switch (type) { switch (type) {
case SPROUT:
mapToUse = &mapSproutNullifiers_;
break;
case SAPLING: case SAPLING:
mapToUse = &mapSaplingNullifiers_; mapToUse = &mapSaplingNullifiers_;
break; break;
@@ -81,9 +78,6 @@ public:
uint256 GetBestAnchor(ShieldedType type) const { uint256 GetBestAnchor(ShieldedType type) const {
switch (type) { switch (type) {
case SPROUT:
return hashBestSproutAnchor_;
break;
case SAPLING: case SAPLING:
return hashBestSaplingAnchor_; return hashBestSaplingAnchor_;
break; break;
@@ -246,9 +240,7 @@ BOOST_FIXTURE_TEST_SUITE(coins_tests, BasicTestingSetup)
void checkNullifierCache(const CCoinsViewCacheTest &cache, const TxWithNullifiers &txWithNullifiers, bool shouldBeInCache) { void checkNullifierCache(const CCoinsViewCacheTest &cache, const TxWithNullifiers &txWithNullifiers, bool shouldBeInCache) {
// Make sure the nullifiers have not gotten mixed up // Make sure the nullifiers have not gotten mixed up
BOOST_CHECK(!cache.GetNullifier(txWithNullifiers.sproutNullifier, SAPLING)); BOOST_CHECK(!cache.GetNullifier(txWithNullifiers.sproutNullifier, SAPLING));
BOOST_CHECK(!cache.GetNullifier(txWithNullifiers.saplingNullifier, SPROUT));
// Check if the nullifiers either are or are not in the cache // Check if the nullifiers either are or are not in the cache
bool containsSproutNullifier = cache.GetNullifier(txWithNullifiers.sproutNullifier, SPROUT);
bool containsSaplingNullifier = cache.GetNullifier(txWithNullifiers.saplingNullifier, SAPLING); bool containsSaplingNullifier = cache.GetNullifier(txWithNullifiers.saplingNullifier, SAPLING);
BOOST_CHECK(containsSproutNullifier == shouldBeInCache); BOOST_CHECK(containsSproutNullifier == shouldBeInCache);
BOOST_CHECK(containsSaplingNullifier == shouldBeInCache); BOOST_CHECK(containsSaplingNullifier == shouldBeInCache);
@@ -417,9 +409,6 @@ template<typename Tree> void anchorPopRegressionTestImpl(ShieldedType type)
BOOST_AUTO_TEST_CASE(anchor_pop_regression_test) BOOST_AUTO_TEST_CASE(anchor_pop_regression_test)
{ {
BOOST_TEST_CONTEXT("Sprout") {
anchorPopRegressionTestImpl<SproutMerkleTree>(SPROUT);
}
BOOST_TEST_CONTEXT("Sapling") { BOOST_TEST_CONTEXT("Sapling") {
anchorPopRegressionTestImpl<SaplingMerkleTree>(SAPLING); anchorPopRegressionTestImpl<SaplingMerkleTree>(SAPLING);
} }
@@ -509,9 +498,6 @@ template<typename Tree> void anchorRegressionTestImpl(ShieldedType type)
BOOST_AUTO_TEST_CASE(anchor_regression_test) BOOST_AUTO_TEST_CASE(anchor_regression_test)
{ {
BOOST_TEST_CONTEXT("Sprout") {
anchorRegressionTestImpl<SproutMerkleTree>(SPROUT);
}
BOOST_TEST_CONTEXT("Sapling") { BOOST_TEST_CONTEXT("Sapling") {
anchorRegressionTestImpl<SaplingMerkleTree>(SAPLING); anchorRegressionTestImpl<SaplingMerkleTree>(SAPLING);
} }
@@ -572,9 +558,6 @@ template<typename Tree> void anchorsFlushImpl(ShieldedType type)
BOOST_AUTO_TEST_CASE(anchors_flush_test) BOOST_AUTO_TEST_CASE(anchors_flush_test)
{ {
BOOST_TEST_CONTEXT("Sprout") {
anchorsFlushImpl<SproutMerkleTree>(SPROUT);
}
BOOST_TEST_CONTEXT("Sapling") { BOOST_TEST_CONTEXT("Sapling") {
anchorsFlushImpl<SaplingMerkleTree>(SAPLING); anchorsFlushImpl<SaplingMerkleTree>(SAPLING);
} }
@@ -730,9 +713,6 @@ template<typename Tree> void anchorsTestImpl(ShieldedType type)
BOOST_AUTO_TEST_CASE(anchors_test) BOOST_AUTO_TEST_CASE(anchors_test)
{ {
BOOST_TEST_CONTEXT("Sprout") {
anchorsTestImpl<SproutMerkleTree>(SPROUT);
}
BOOST_TEST_CONTEXT("Sapling") { BOOST_TEST_CONTEXT("Sapling") {
anchorsTestImpl<SaplingMerkleTree>(SAPLING); anchorsTestImpl<SaplingMerkleTree>(SAPLING);
} }