From b4ff7076056bf2be63629a467da49b741d0ff0d3 Mon Sep 17 00:00:00 2001 From: Sean Bowe Date: Sun, 6 May 2018 23:29:29 -0600 Subject: [PATCH] Add support for Sapling anchor checks in mempool consistency checks. --- src/txmempool.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/txmempool.cpp b/src/txmempool.cpp index 2a96ecac9..a9a33602f 100644 --- a/src/txmempool.cpp +++ b/src/txmempool.cpp @@ -413,7 +413,9 @@ void CTxMemPool::check(const CCoinsViewCache *pcoins) const intermediates.insert(std::make_pair(tree.root(), tree)); } for (const SpendDescription &spendDescription : tx.vShieldedSpend) { - // TODO: anchor check + ZCSaplingIncrementalMerkleTree tree; + + assert(pcoins->GetSaplingAnchorAt(spendDescription.anchor, tree)); assert(!pcoins->GetNullifier(spendDescription.nullifier, SAPLING)); } if (fDependsWait)