mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-11 14:38:29 +01:00
Add importprunedfunds rpc call
This commit is contained in:
@@ -88,7 +88,8 @@ BOOST_AUTO_TEST_CASE(pmt_test1)
|
||||
|
||||
// extract merkle root and matched txids from copy
|
||||
std::vector<uint256> vMatchTxid2;
|
||||
uint256 merkleRoot2 = pmt2.ExtractMatches(vMatchTxid2);
|
||||
std::vector<unsigned int> vIndex;
|
||||
uint256 merkleRoot2 = pmt2.ExtractMatches(vMatchTxid2, vIndex);
|
||||
|
||||
// check that it has the same merkle root as the original, and a valid one
|
||||
BOOST_CHECK(merkleRoot1 == merkleRoot2);
|
||||
@@ -102,7 +103,7 @@ BOOST_AUTO_TEST_CASE(pmt_test1)
|
||||
CPartialMerkleTreeTester pmt3(pmt2);
|
||||
pmt3.Damage();
|
||||
std::vector<uint256> vMatchTxid3;
|
||||
uint256 merkleRoot3 = pmt3.ExtractMatches(vMatchTxid3);
|
||||
uint256 merkleRoot3 = pmt3.ExtractMatches(vMatchTxid3, vIndex);
|
||||
BOOST_CHECK(merkleRoot3 != merkleRoot1);
|
||||
}
|
||||
}
|
||||
@@ -122,7 +123,8 @@ BOOST_AUTO_TEST_CASE(pmt_malleability)
|
||||
|
||||
CPartialMerkleTree tree(vTxid, vMatch);
|
||||
std::vector<uint256> vTxid2;
|
||||
BOOST_CHECK(tree.ExtractMatches(vTxid).IsNull());
|
||||
std::vector<unsigned int> vIndex;
|
||||
BOOST_CHECK(tree.ExtractMatches(vTxid, vIndex).IsNull());
|
||||
}
|
||||
|
||||
BOOST_AUTO_TEST_SUITE_END()
|
||||
|
||||
Reference in New Issue
Block a user