Fix failing test
This commit is contained in:
parent
268bd84f9a
commit
f7d78fdde1
|
@ -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) {
|
||||||
|
|
|
@ -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;
|
||||||
|
|
Loading…
Reference in New Issue