Skip to content

Commit

Permalink
Fix wallet_tests.cpp, missing fInMempool flag set.
Browse files Browse the repository at this point in the history
  • Loading branch information
furszy committed Feb 24, 2021
1 parent 815667d commit 1ed753f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/wallet/test/wallet_tests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
#include "wallet/wallet.h"

#include <set>
#include <stdint.h>
#include <utility>
#include <vector>

Expand Down Expand Up @@ -334,6 +333,7 @@ CBlockIndex* SimpleFakeMine(CWalletTx& wtx, CBlockIndex* pprev = nullptr)
BOOST_CHECK(chainActive.Contains(fakeIndex));
wtx.SetMerkleBranch(fakeIndex->GetBlockHash(), 0);
removeTxFromMempool(wtx);
wtx.fInMempool = false;
return fakeIndex;
}

Expand Down Expand Up @@ -436,6 +436,7 @@ BOOST_AUTO_TEST_CASE(cached_balances_tests)

// GetUnconfirmedBalance requires tx in mempool.
fakeMempoolInsertion(wtxCredit.tx);
wtxCredit.fInMempool = true;
BOOST_CHECK_EQUAL(wallet.GetUnconfirmedBalance(), nCredit);

// 2) Confirm tx and verify
Expand Down

0 comments on commit 1ed753f

Please sign in to comment.