Deprecate the old tree and remove old tree tests from the test suite.

This commit is contained in:
Sean Bowe
2016-04-03 16:05:08 -06:00
parent 482aefbd0d
commit 1760b3cd88
12 changed files with 85 additions and 323 deletions

View File

@@ -2480,10 +2480,9 @@ Value zc_raw_receive(const json_spirit::Array& params, bool fHelp)
uint256 commitment = uint256(commitment_v);
assert(pwalletMain != NULL);
libsnark::merkle_authentication_path path(INCREMENTAL_MERKLE_TREE_DEPTH); // We don't care during receive... yet! :)
size_t path_index = 0;
libzcash::MerklePath path;
uint256 anchor;
auto found_in_chain = pwalletMain->WitnessBucketCommitment(commitment, path, path_index, anchor);
auto found_in_chain = pwalletMain->WitnessBucketCommitment(commitment, path, anchor);
CAmount value_of_bucket = decrypted_bucket.getValue();
@@ -2587,14 +2586,13 @@ Value zc_raw_pour(const json_spirit::Array& params, bool fHelp)
std::vector<unsigned char> commitment_v = input_coin.getCoinCommitment().getCommitmentValue();
uint256 commitment = uint256(commitment_v);
libsnark::merkle_authentication_path path(INCREMENTAL_MERKLE_TREE_DEPTH);
size_t path_index = 0;
libzcash::MerklePath path;
assert(pwalletMain != NULL);
if (!pwalletMain->WitnessBucketCommitment(commitment, path, path_index, anchor)) {
if (!pwalletMain->WitnessBucketCommitment(commitment, path, anchor)) {
throw std::runtime_error("Couldn't find bucket in the blockchain");
}
vpourin.push_back(PourInput(input_coin, zcaddress, path_index, path));
vpourin.push_back(PourInput(input_coin, zcaddress, path));
}
while (vpourin.size() < NUM_POUR_INPUTS) {