From 70a7535ae8c782943b0fda1e56b41ac260732d30 Mon Sep 17 00:00:00 2001 From: Jack Grigg Date: Tue, 17 Jul 2018 10:34:48 -0600 Subject: [PATCH] Expose note position in IncrementalMerkleWitness --- src/zcash/IncrementalMerkleTree.hpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/zcash/IncrementalMerkleTree.hpp b/src/zcash/IncrementalMerkleTree.hpp index 912e9fff0..1e4c8ac85 100644 --- a/src/zcash/IncrementalMerkleTree.hpp +++ b/src/zcash/IncrementalMerkleTree.hpp @@ -170,6 +170,10 @@ public: return tree.last(); } + uint64_t position() const { + return tree.size() - 1; + } + Hash root() const { return tree.root(Depth, partial_path()); }