Fix failing test

This commit is contained in:
Jack Grigg 2016-09-01 20:16:18 +12:00
parent 268bd84f9a
commit f7d78fdde1
2 changed files with 4 additions and 5 deletions

View File

@ -386,11 +386,9 @@ TEST(wallet_tests, cached_witnesses_empty_chain) {
EXPECT_TRUE((bool) witnesses[0]); EXPECT_TRUE((bool) witnesses[0]);
EXPECT_TRUE((bool) witnesses[1]); EXPECT_TRUE((bool) witnesses[1]);
wallet.DecrementNoteWitnesses(); // Until #1302 is implemented, this should triggger an assertion
witnesses.clear(); EXPECT_DEATH(wallet.DecrementNoteWitnesses(),
wallet.GetNoteWitnesses(notes, witnesses, anchor); "Assertion `nWitnessCacheSize > 0' failed.");
EXPECT_FALSE((bool) witnesses[0]);
EXPECT_FALSE((bool) witnesses[1]);
} }
TEST(wallet_tests, cached_witnesses_chain_tip) { TEST(wallet_tests, cached_witnesses_chain_tip) {

View File

@ -651,6 +651,7 @@ public:
nLastResend = 0; nLastResend = 0;
nTimeFirstKey = 0; nTimeFirstKey = 0;
fBroadcastTransactions = false; fBroadcastTransactions = false;
nWitnessCacheSize = 0;
} }
std::map<uint256, JSOutPoint> mapNullifiersToNotes; std::map<uint256, JSOutPoint> mapNullifiersToNotes;