mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-14 12:43:40 +02:00
Tests: Disable bloom filter tests which depend on interaction between bitcoin serialization and Merkle blocks / bloom filters. These tests will have to be redone using elements-formatted blocks.
This commit is contained in:
parent
f120b21baf
commit
2a0eda566a
1 changed files with 23 additions and 0 deletions
|
|
@ -111,6 +111,14 @@ BOOST_AUTO_TEST_CASE(bloom_create_insert_key)
|
|||
BOOST_CHECK_EQUAL_COLLECTIONS(stream.begin(), stream.end(), expected.begin(), expected.end());
|
||||
}
|
||||
|
||||
// The one major casualty of separating mainchain and sidechain serialization
|
||||
// classes is the following bloom filter tests. These tests, inhereted from
|
||||
// upstream, do bloom filter matching on bitcoin blocks. However the bitcoin
|
||||
// serialization classes are not compatible with the native bloom filter
|
||||
// functionality, so these must be disabled until such time as elements
|
||||
// versions of these tests can be constructed.
|
||||
|
||||
#if 0
|
||||
BOOST_AUTO_TEST_CASE(bloom_match)
|
||||
{
|
||||
// Random real transaction (b4749f017444b051c44dfd2720e88f314ff94f3dd6d56d40ef65854fcd7fff6b)
|
||||
|
|
@ -181,7 +189,9 @@ BOOST_AUTO_TEST_CASE(bloom_match)
|
|||
filter.insert(COutPoint(uint256S("0x000000d70786e899529d71dbeba91ba216982fb6ba58f3bdaab65e73b7e9260b"), 0));
|
||||
BOOST_CHECK_MESSAGE(!filter.IsRelevantAndUpdate(tx), "Simple Bloom filter matched COutPoint for an output we didn't care about");
|
||||
}
|
||||
#endif // 0
|
||||
|
||||
#if 0
|
||||
BOOST_AUTO_TEST_CASE(merkle_block_1)
|
||||
{
|
||||
// Random real block (0000000000013b8ab2cd513b0261a14096412195a72a0c4827d229dcc7e0f7af)
|
||||
|
|
@ -227,7 +237,9 @@ BOOST_AUTO_TEST_CASE(merkle_block_1)
|
|||
for (unsigned int i = 0; i < vMatched.size(); i++)
|
||||
BOOST_CHECK(vMatched[i] == merkleBlock.vMatchedTxn[i].second);
|
||||
}
|
||||
#endif // 0
|
||||
|
||||
#if 0
|
||||
BOOST_AUTO_TEST_CASE(merkle_block_2)
|
||||
{
|
||||
// Random real block (000000005a4ded781e667e06ceefafb71410b511fe0d5adc3e5a27ecbec34ae6)
|
||||
|
|
@ -282,7 +294,9 @@ BOOST_AUTO_TEST_CASE(merkle_block_2)
|
|||
for (unsigned int i = 0; i < vMatched.size(); i++)
|
||||
BOOST_CHECK(vMatched[i] == merkleBlock.vMatchedTxn[i].second);
|
||||
}
|
||||
#endif // 0
|
||||
|
||||
#if 0
|
||||
BOOST_AUTO_TEST_CASE(merkle_block_2_with_update_none)
|
||||
{
|
||||
// Random real block (000000005a4ded781e667e06ceefafb71410b511fe0d5adc3e5a27ecbec34ae6)
|
||||
|
|
@ -334,7 +348,9 @@ BOOST_AUTO_TEST_CASE(merkle_block_2_with_update_none)
|
|||
for (unsigned int i = 0; i < vMatched.size(); i++)
|
||||
BOOST_CHECK(vMatched[i] == merkleBlock.vMatchedTxn[i].second);
|
||||
}
|
||||
#endif // 0
|
||||
|
||||
#if 0
|
||||
BOOST_AUTO_TEST_CASE(merkle_block_3_and_serialize)
|
||||
{
|
||||
// Random real block (000000000000dab0130bbcc991d3d7ae6b81aa6f50a798888dfe62337458dc45)
|
||||
|
|
@ -373,7 +389,9 @@ BOOST_AUTO_TEST_CASE(merkle_block_3_and_serialize)
|
|||
|
||||
BOOST_CHECK_EQUAL_COLLECTIONS(expected.begin(), expected.end(), merkleStream.begin(), merkleStream.end());
|
||||
}
|
||||
#endif // 0
|
||||
|
||||
#if 0
|
||||
BOOST_AUTO_TEST_CASE(merkle_block_4)
|
||||
{
|
||||
// Random real block (000000000000b731f2eef9e8c63173adfb07e41bd53eb0ef0a6b720d6cb6dea4)
|
||||
|
|
@ -419,7 +437,9 @@ BOOST_AUTO_TEST_CASE(merkle_block_4)
|
|||
for (unsigned int i = 0; i < vMatched.size(); i++)
|
||||
BOOST_CHECK(vMatched[i] == merkleBlock.vMatchedTxn[i].second);
|
||||
}
|
||||
#endif // 0
|
||||
|
||||
#if 0
|
||||
BOOST_AUTO_TEST_CASE(merkle_block_4_test_p2pubkey_only)
|
||||
{
|
||||
// Random real block (000000000000b731f2eef9e8c63173adfb07e41bd53eb0ef0a6b720d6cb6dea4)
|
||||
|
|
@ -442,7 +462,9 @@ BOOST_AUTO_TEST_CASE(merkle_block_4_test_p2pubkey_only)
|
|||
// ... but not the 4th transaction's output (its not pay-2-pubkey)
|
||||
BOOST_CHECK(!filter.contains(COutPoint(uint256S("0x02981fa052f0481dbc5868f4fc2166035a10f27a03cfd2de67326471df5bc041"), 0)));
|
||||
}
|
||||
#endif // 0
|
||||
|
||||
#if 0
|
||||
BOOST_AUTO_TEST_CASE(merkle_block_4_test_update_none)
|
||||
{
|
||||
// Random real block (000000000000b731f2eef9e8c63173adfb07e41bd53eb0ef0a6b720d6cb6dea4)
|
||||
|
|
@ -464,6 +486,7 @@ BOOST_AUTO_TEST_CASE(merkle_block_4_test_update_none)
|
|||
BOOST_CHECK(!filter.contains(COutPoint(uint256S("0x147caa76786596590baa4e98f5d9f48b86c7765e489f7a6ff3360fe5c674360b"), 0)));
|
||||
BOOST_CHECK(!filter.contains(COutPoint(uint256S("0x02981fa052f0481dbc5868f4fc2166035a10f27a03cfd2de67326471df5bc041"), 0)));
|
||||
}
|
||||
#endif // 0
|
||||
|
||||
static std::vector<unsigned char> RandomData()
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue