Replace vAnchorCache with a cache size counter

The anchor is obtained from the returned witnesses; since all witnesses are to
the same point (the latest blockchain tip), they all have the same root.
This commit is contained in:
Jack Grigg
2016-08-31 14:13:28 +12:00
parent 3fac1020e7
commit 4086e5ce98
5 changed files with 27 additions and 21 deletions

View File

@@ -402,7 +402,8 @@ TEST(wallet_tests, cached_witnesses_chain_tip) {
witnesses.clear();
wallet.GetNoteWitnesses(notes, witnesses, anchor3);
EXPECT_FALSE((bool) witnesses[0]);
EXPECT_EQ(anchor1, anchor3);
// Should not equal first anchor because none of these notes had witnesses
EXPECT_NE(anchor1, anchor3);
// Re-incrementing with the same block should give the same result
uint256 anchor4;