Rename test objects to include sprout or sapling
This commit is contained in:
parent
8ea8ef9850
commit
7d379f18c5
|
@ -39,7 +39,7 @@ using namespace std;
|
||||||
using namespace libsnark;
|
using namespace libsnark;
|
||||||
|
|
||||||
template<>
|
template<>
|
||||||
void expect_deser_same(const ZCTestingIncrementalWitness& expected)
|
void expect_deser_same(const SproutTestingWitness& expected)
|
||||||
{
|
{
|
||||||
// Cannot check this; IncrementalWitness cannot be
|
// Cannot check this; IncrementalWitness cannot be
|
||||||
// deserialized because it can only be constructed by
|
// deserialized because it can only be constructed by
|
||||||
|
@ -195,7 +195,7 @@ TEST(merkletree, vectors) {
|
||||||
UniValue path_tests = read_json(MAKE_STRING(json_tests::merkle_path));
|
UniValue path_tests = read_json(MAKE_STRING(json_tests::merkle_path));
|
||||||
UniValue commitment_tests = read_json(MAKE_STRING(json_tests::merkle_commitments));
|
UniValue commitment_tests = read_json(MAKE_STRING(json_tests::merkle_commitments));
|
||||||
|
|
||||||
test_tree<ZCTestingIncrementalMerkleTree, ZCTestingIncrementalWitness>(
|
test_tree<SproutTestingMerkleTree, SproutTestingWitness>(
|
||||||
commitment_tests,
|
commitment_tests,
|
||||||
root_tests,
|
root_tests,
|
||||||
ser_tests,
|
ser_tests,
|
||||||
|
@ -212,7 +212,7 @@ TEST(merkletree, SaplingVectors) {
|
||||||
UniValue path_tests = read_json(MAKE_STRING(json_tests::merkle_path_sapling));
|
UniValue path_tests = read_json(MAKE_STRING(json_tests::merkle_path_sapling));
|
||||||
UniValue commitment_tests = read_json(MAKE_STRING(json_tests::merkle_commitments_sapling));
|
UniValue commitment_tests = read_json(MAKE_STRING(json_tests::merkle_commitments_sapling));
|
||||||
|
|
||||||
test_tree<ZCSaplingTestingIncrementalMerkleTree, ZCSaplingTestingIncrementalWitness>(
|
test_tree<SaplingTestingMerkleTree, SaplingTestingWitness>(
|
||||||
commitment_tests,
|
commitment_tests,
|
||||||
root_tests,
|
root_tests,
|
||||||
ser_tests,
|
ser_tests,
|
||||||
|
@ -280,7 +280,7 @@ TEST(merkletree, deserializeInvalid) {
|
||||||
CDataStream ss(SER_NETWORK, PROTOCOL_VERSION);
|
CDataStream ss(SER_NETWORK, PROTOCOL_VERSION);
|
||||||
ss << newTree;
|
ss << newTree;
|
||||||
|
|
||||||
ZCTestingIncrementalMerkleTree newTreeSmall;
|
SproutTestingMerkleTree newTreeSmall;
|
||||||
ASSERT_THROW({ss >> newTreeSmall;}, std::ios_base::failure);
|
ASSERT_THROW({ss >> newTreeSmall;}, std::ios_base::failure);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -249,15 +249,15 @@ EmptyMerkleRoots<Depth, Hash> IncrementalMerkleTree<Depth, Hash>::emptyroots;
|
||||||
} // end namespace `libzcash`
|
} // end namespace `libzcash`
|
||||||
|
|
||||||
typedef libzcash::IncrementalMerkleTree<INCREMENTAL_MERKLE_TREE_DEPTH, libzcash::SHA256Compress> SproutMerkleTree;
|
typedef libzcash::IncrementalMerkleTree<INCREMENTAL_MERKLE_TREE_DEPTH, libzcash::SHA256Compress> SproutMerkleTree;
|
||||||
typedef libzcash::IncrementalMerkleTree<INCREMENTAL_MERKLE_TREE_DEPTH_TESTING, libzcash::SHA256Compress> ZCTestingIncrementalMerkleTree;
|
typedef libzcash::IncrementalMerkleTree<INCREMENTAL_MERKLE_TREE_DEPTH_TESTING, libzcash::SHA256Compress> SproutTestingMerkleTree;
|
||||||
|
|
||||||
typedef libzcash::IncrementalWitness<INCREMENTAL_MERKLE_TREE_DEPTH, libzcash::SHA256Compress> SproutWitness;
|
typedef libzcash::IncrementalWitness<INCREMENTAL_MERKLE_TREE_DEPTH, libzcash::SHA256Compress> SproutWitness;
|
||||||
typedef libzcash::IncrementalWitness<INCREMENTAL_MERKLE_TREE_DEPTH_TESTING, libzcash::SHA256Compress> ZCTestingIncrementalWitness;
|
typedef libzcash::IncrementalWitness<INCREMENTAL_MERKLE_TREE_DEPTH_TESTING, libzcash::SHA256Compress> SproutTestingWitness;
|
||||||
|
|
||||||
typedef libzcash::IncrementalMerkleTree<SAPLING_INCREMENTAL_MERKLE_TREE_DEPTH, libzcash::PedersenHash> SaplingMerkleTree;
|
typedef libzcash::IncrementalMerkleTree<SAPLING_INCREMENTAL_MERKLE_TREE_DEPTH, libzcash::PedersenHash> SaplingMerkleTree;
|
||||||
typedef libzcash::IncrementalMerkleTree<INCREMENTAL_MERKLE_TREE_DEPTH_TESTING, libzcash::PedersenHash> ZCSaplingTestingIncrementalMerkleTree;
|
typedef libzcash::IncrementalMerkleTree<INCREMENTAL_MERKLE_TREE_DEPTH_TESTING, libzcash::PedersenHash> SaplingTestingMerkleTree;
|
||||||
|
|
||||||
typedef libzcash::IncrementalWitness<SAPLING_INCREMENTAL_MERKLE_TREE_DEPTH, libzcash::PedersenHash> SaplingWitness;
|
typedef libzcash::IncrementalWitness<SAPLING_INCREMENTAL_MERKLE_TREE_DEPTH, libzcash::PedersenHash> SaplingWitness;
|
||||||
typedef libzcash::IncrementalWitness<INCREMENTAL_MERKLE_TREE_DEPTH_TESTING, libzcash::PedersenHash> ZCSaplingTestingIncrementalWitness;
|
typedef libzcash::IncrementalWitness<INCREMENTAL_MERKLE_TREE_DEPTH_TESTING, libzcash::PedersenHash> SaplingTestingWitness;
|
||||||
|
|
||||||
#endif /* ZC_INCREMENTALMERKLETREE_H_ */
|
#endif /* ZC_INCREMENTALMERKLETREE_H_ */
|
||||||
|
|
Loading…
Reference in New Issue