Rename Merkle Trees to include sprout or sapling

This commit is contained in:
Eirik Ogilvie-Wigley
2018-08-01 10:31:09 -06:00
parent d84f14ec4a
commit 4fc309f0f5
28 changed files with 151 additions and 151 deletions

View File

@@ -112,7 +112,7 @@ double benchmark_create_joinsplit()
uint256 joinSplitPubKey;
/* Get the anchor of an empty commitment tree. */
uint256 anchor = ZCIncrementalMerkleTree().root();
uint256 anchor = SproutMerkleTree().root();
struct timeval tv_start;
timer_start(tv_start);
@@ -298,8 +298,8 @@ double benchmark_try_decrypt_notes(size_t nAddrs)
double benchmark_increment_note_witnesses(size_t nTxs)
{
CWallet wallet;
ZCIncrementalMerkleTree sproutTree;
ZCSaplingIncrementalMerkleTree saplingTree;
SproutMerkleTree sproutTree;
SaplingMerkleTree saplingTree;
auto sk = libzcash::SproutSpendingKey::random();
wallet.AddSpendingKey(sk);
@@ -355,12 +355,12 @@ double benchmark_increment_note_witnesses(size_t nTxs)
// Fake the input of a given block
class FakeCoinsViewDB : public CCoinsViewDB {
uint256 hash;
ZCIncrementalMerkleTree t;
SproutMerkleTree t;
public:
FakeCoinsViewDB(std::string dbName, uint256& hash) : CCoinsViewDB(dbName, 100, false, false), hash(hash) {}
bool GetAnchorAt(const uint256 &rt, ZCIncrementalMerkleTree &tree) const {
bool GetAnchorAt(const uint256 &rt, SproutMerkleTree &tree) const {
if (rt == t.root()) {
tree = t;
return true;