Move explicit instantiation of IncrementalMerkleTree::emptyroots into header

Fixes a -Wundefined-var-template warning with clang.
This commit is contained in:
Jack Grigg
2018-03-28 18:29:19 +02:00
parent 6c7930f688
commit 4fe053e6e8
2 changed files with 3 additions and 3 deletions
-3
View File
@@ -45,9 +45,6 @@ public:
template<size_t Depth, typename Hash>
EmptyMerkleRoots<Depth, Hash> PathFiller<Depth, Hash>::emptyroots;
template<size_t Depth, typename Hash>
EmptyMerkleRoots<Depth, Hash> IncrementalMerkleTree<Depth, Hash>::emptyroots;
template<size_t Depth, typename Hash>
void IncrementalMerkleTree<Depth, Hash>::wfcheck() const {
if (parents.size() >= Depth) {
+3
View File
@@ -216,6 +216,9 @@ public:
static SHA256Compress combine(const SHA256Compress& a, const SHA256Compress& b);
};
template<size_t Depth, typename Hash>
EmptyMerkleRoots<Depth, Hash> IncrementalMerkleTree<Depth, Hash>::emptyroots;
} // end namespace `libzcash`
typedef libzcash::IncrementalMerkleTree<INCREMENTAL_MERKLE_TREE_DEPTH, libzcash::SHA256Compress> ZCIncrementalMerkleTree;