Skip to content

Commit

Permalink
Changed visibility of critical section back to private
Browse files Browse the repository at this point in the history
  • Loading branch information
psolstice committed Jul 20, 2024
1 parent 0338196 commit 1dac305
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/llmq/quorums_instantsend.h
Original file line number Diff line number Diff line change
Expand Up @@ -109,10 +109,10 @@ class CInstantSendManager : public CRecoveredSigsListener
std::unordered_set<uint256, StaticSaltedHasher> pendingRetryTxs;
std::atomic_bool isNewInstantSendEnabled{false};

public:
CCriticalSection cs;
CInstantSendDb db;

public:
CInstantSendManager(CDBWrapper& _llmqDb);
~CInstantSendManager();

Expand Down
3 changes: 1 addition & 2 deletions src/wallet/test/createtransaction_tests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -134,8 +134,7 @@ void AssertHasKey(CReserveKey& reservekey, const CWalletTx& wtx, uint32_t voutN)
#define ASSERT_HAS_KEY(voutN) AssertHasKey(reservekey, wtx, voutN)
#define ASSERT_SUCCESS() if (!strFailReason.empty()) BOOST_FAIL(strFailReason)
#define ASSERT_FAILURE(reason) BOOST_ASSERT(strFailReason == reason)
#define ACQUIRE_LOCKS() LOCK2(cs_main, pwalletMain->cs_wallet);\
LOCK(llmq::quorumInstantSendManager->cs);
#define ACQUIRE_LOCKS() LOCK2(cs_main, pwalletMain->cs_wallet)

BOOST_FIXTURE_TEST_SUITE(createtransaction_tests, WalletTestingSetup)
BOOST_AUTO_TEST_CASE(sends_money) {
Expand Down
3 changes: 1 addition & 2 deletions src/wallet/wallet.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -236,9 +236,8 @@ bool CTransparentTxout::IsLLMQInstantSendLocked() const {

assert(wallet);
AssertLockHeld(wallet->cs_wallet);
AssertLockHeld(llmq::quorumInstantSendManager->cs);

return llmq::quorumInstantSendManager->db.GetInstantSendLockByTxid(GetHash()) != nullptr;
return llmq::quorumInstantSendManager->IsLocked(GetHash());
}

bool CTransparentTxout::IsCoinBase() const {
Expand Down

0 comments on commit 1dac305

Please sign in to comment.