Auto merge of #3258 - Eirik0:3056-anchor-test-cases, r=str4d

Add tests for sapling anchors

Closes #3253
This commit is contained in:
Homu
2018-06-19 09:28:20 -07:00
4 changed files with 159 additions and 126 deletions

View File

@@ -222,7 +222,8 @@ void CCoinsViewCache::AbstractPushAnchor(
}
}
void CCoinsViewCache::PushSproutAnchor(const ZCIncrementalMerkleTree &tree) {
template<> void CCoinsViewCache::PushAnchor(const ZCIncrementalMerkleTree &tree)
{
AbstractPushAnchor<ZCIncrementalMerkleTree, CAnchorsSproutMap, CAnchorsSproutMap::iterator, CAnchorsSproutCacheEntry>(
tree,
SPROUT,
@@ -231,7 +232,8 @@ void CCoinsViewCache::PushSproutAnchor(const ZCIncrementalMerkleTree &tree) {
);
}
void CCoinsViewCache::PushSaplingAnchor(const ZCSaplingIncrementalMerkleTree &tree) {
template<> void CCoinsViewCache::PushAnchor(const ZCSaplingIncrementalMerkleTree &tree)
{
AbstractPushAnchor<ZCSaplingIncrementalMerkleTree, CAnchorsSaplingMap, CAnchorsSaplingMap::iterator, CAnchorsSaplingCacheEntry>(
tree,
SAPLING,