Skip to content

Commit d4e75ab

Browse files
committed
Call new signals in CChainLocksHandler
1 parent 25c40fe commit d4e75ab

File tree

3 files changed

+21
-1
lines changed

3 files changed

+21
-1
lines changed

src/dsnotificationinterface.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,14 +74,14 @@ void CDSNotificationInterface::UpdatedBlockTip(const CBlockIndex *pindexNew, con
7474

7575
void CDSNotificationInterface::SyncTransaction(const CTransactionRef& tx, const CBlockIndex* pindex, int posInBlock)
7676
{
77-
llmq::chainLocksHandler->SyncTransaction(tx, pindex, posInBlock);
7877
instantsend.SyncTransaction(tx, pindex, posInBlock);
7978
CPrivateSend::SyncTransaction(tx, pindex, posInBlock);
8079
}
8180

8281
void CDSNotificationInterface::TransactionAddedToMempool(const CTransactionRef& ptx)
8382
{
8483
llmq::quorumInstantSendManager->TransactionAddedToMempool(ptx);
84+
llmq::chainLocksHandler->TransactionAddedToMempool(ptx);
8585
SyncTransaction(ptx);
8686
}
8787

@@ -96,6 +96,7 @@ void CDSNotificationInterface::BlockConnected(const std::shared_ptr<const CBlock
9696
// the notification that the conflicted transaction was evicted.
9797

9898
llmq::quorumInstantSendManager->BlockConnected(pblock, pindex, vtxConflicted);
99+
llmq::chainLocksHandler->BlockConnected(pblock, pindex, vtxConflicted);
99100

100101
for (const CTransactionRef& ptx : vtxConflicted) {
101102
SyncTransaction(ptx);
@@ -108,6 +109,7 @@ void CDSNotificationInterface::BlockConnected(const std::shared_ptr<const CBlock
108109
void CDSNotificationInterface::BlockDisconnected(const std::shared_ptr<const CBlock>& pblock, const CBlockIndex* pindexDisconnected)
109110
{
110111
llmq::quorumInstantSendManager->BlockDisconnected(pblock, pindexDisconnected);
112+
llmq::chainLocksHandler->BlockDisconnected(pblock, pindexDisconnected);
111113

112114
for (const CTransactionRef& ptx : pblock->vtx) {
113115
SyncTransaction(ptx, pindexDisconnected->pprev, -1);

src/llmq/quorums_chainlocks.cpp

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -345,6 +345,21 @@ void CChainLocksHandler::TrySignChainTip()
345345
quorumSigningManager->AsyncSignIfMember(Params().GetConsensus().llmqChainLocks, requestId, msgHash);
346346
}
347347

348+
void CChainLocksHandler::TransactionAddedToMempool(const CTransactionRef& tx)
349+
{
350+
351+
}
352+
353+
void CChainLocksHandler::BlockConnected(const std::shared_ptr<const CBlock>& pblock, const CBlockIndex* pindex, const std::vector<CTransactionRef>& vtxConflicted)
354+
{
355+
356+
}
357+
358+
void CChainLocksHandler::BlockDisconnected(const std::shared_ptr<const CBlock>& pblock, const CBlockIndex* pindexDisconnected)
359+
{
360+
361+
}
362+
348363
void CChainLocksHandler::SyncTransaction(const CTransactionRef& tx, const CBlockIndex* pindex, int posInBlock)
349364
{
350365
if (!masternodeSync.IsBlockchainSynced()) {

src/llmq/quorums_chainlocks.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,9 @@ class CChainLocksHandler : public CRecoveredSigsListener
9090
void ProcessNewChainLock(NodeId from, const CChainLockSig& clsig, const uint256& hash);
9191
void AcceptedBlockHeader(const CBlockIndex* pindexNew);
9292
void UpdatedBlockTip(const CBlockIndex* pindexNew);
93+
void TransactionAddedToMempool(const CTransactionRef& tx);
94+
void BlockConnected(const std::shared_ptr<const CBlock>& pblock, const CBlockIndex* pindex, const std::vector<CTransactionRef>& vtxConflicted);
95+
void BlockDisconnected(const std::shared_ptr<const CBlock>& pblock, const CBlockIndex* pindexDisconnected);
9396
void SyncTransaction(const CTransactionRef& tx, const CBlockIndex* pindex = nullptr, int posInBlock = 0);
9497
void CheckActiveState();
9598
void TrySignChainTip();

0 commit comments

Comments
 (0)