Skip to content

Commit 4b4234f

Browse files
authored
Refactor: fix layer violation for LLMQ based IS in UI (#2808)
Ignoring the same issue for legacy IS because it's going to be removed later.
1 parent 614cb6c commit 4b4234f

File tree

3 files changed

+8
-4
lines changed

3 files changed

+8
-4
lines changed

src/qt/transactiondesc.cpp

+2-4
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,6 @@
2121

2222
#include "instantx.h"
2323

24-
#include "llmq/quorums_instantsend.h"
25-
2624
#include <stdint.h>
2725
#include <string>
2826

@@ -59,8 +57,8 @@ QString TransactionDesc::FormatTxStatus(const CWalletTx& wtx)
5957
}
6058
}
6159

62-
if (llmq::quorumInstantSendManager->IsLocked(wtx.GetHash())) {
63-
strTxStatus += tr(" (verified via LLMQ based InstantSend)");
60+
if (wtx.IsLockedByLLMQInstantSend()) {
61+
strTxStatus += " (" + tr("verified via LLMQ based InstantSend") + ")";
6462
return strTxStatus;
6563
}
6664

src/wallet/wallet.cpp

+5
Original file line numberDiff line numberDiff line change
@@ -5405,6 +5405,11 @@ bool CMerkleTx::IsLockedByInstantSend() const
54055405
return instantsend.IsLockedInstantSendTransaction(GetHash()) || llmq::quorumInstantSendManager->IsLocked(GetHash());
54065406
}
54075407

5408+
bool CMerkleTx::IsLockedByLLMQInstantSend() const
5409+
{
5410+
return llmq::quorumInstantSendManager->IsLocked(GetHash());
5411+
}
5412+
54085413
bool CMerkleTx::IsChainLocked() const
54095414
{
54105415
AssertLockHeld(cs_main);

src/wallet/wallet.h

+1
Original file line numberDiff line numberDiff line change
@@ -271,6 +271,7 @@ class CMerkleTx
271271
int GetDepthInMainChain() const { const CBlockIndex *pindexRet; return GetDepthInMainChain(pindexRet); }
272272
bool IsInMainChain() const { const CBlockIndex *pindexRet; return GetDepthInMainChain(pindexRet) > 0; }
273273
bool IsLockedByInstantSend() const;
274+
bool IsLockedByLLMQInstantSend() const;
274275
bool IsChainLocked() const;
275276
int GetBlocksToMaturity() const;
276277
/** Pass this transaction to the mempool. Fails if absolute fee exceeds absurd fee. */

0 commit comments

Comments
 (0)