From d4e75abbfdcb300d086d56465a939aa51c08e135 Mon Sep 17 00:00:00 2001 From: Alexander Block Date: Mon, 27 May 2019 13:48:01 +0200 Subject: [PATCH] Call new signals in CChainLocksHandler --- src/dsnotificationinterface.cpp | 4 +++- src/llmq/quorums_chainlocks.cpp | 15 +++++++++++++++ src/llmq/quorums_chainlocks.h | 3 +++ 3 files changed, 21 insertions(+), 1 deletion(-) diff --git a/src/dsnotificationinterface.cpp b/src/dsnotificationinterface.cpp index 0a18570d4..233961a46 100644 --- a/src/dsnotificationinterface.cpp +++ b/src/dsnotificationinterface.cpp @@ -74,7 +74,6 @@ void CDSNotificationInterface::UpdatedBlockTip(const CBlockIndex *pindexNew, con void CDSNotificationInterface::SyncTransaction(const CTransactionRef& tx, const CBlockIndex* pindex, int posInBlock) { - llmq::chainLocksHandler->SyncTransaction(tx, pindex, posInBlock); instantsend.SyncTransaction(tx, pindex, posInBlock); CPrivateSend::SyncTransaction(tx, pindex, posInBlock); } @@ -82,6 +81,7 @@ void CDSNotificationInterface::SyncTransaction(const CTransactionRef& tx, const void CDSNotificationInterface::TransactionAddedToMempool(const CTransactionRef& ptx) { llmq::quorumInstantSendManager->TransactionAddedToMempool(ptx); + llmq::chainLocksHandler->TransactionAddedToMempool(ptx); SyncTransaction(ptx); } @@ -96,6 +96,7 @@ void CDSNotificationInterface::BlockConnected(const std::shared_ptrBlockConnected(pblock, pindex, vtxConflicted); + llmq::chainLocksHandler->BlockConnected(pblock, pindex, vtxConflicted); for (const CTransactionRef& ptx : vtxConflicted) { SyncTransaction(ptx); @@ -108,6 +109,7 @@ void CDSNotificationInterface::BlockConnected(const std::shared_ptr& pblock, const CBlockIndex* pindexDisconnected) { llmq::quorumInstantSendManager->BlockDisconnected(pblock, pindexDisconnected); + llmq::chainLocksHandler->BlockDisconnected(pblock, pindexDisconnected); for (const CTransactionRef& ptx : pblock->vtx) { SyncTransaction(ptx, pindexDisconnected->pprev, -1); diff --git a/src/llmq/quorums_chainlocks.cpp b/src/llmq/quorums_chainlocks.cpp index 7ced03cd8..bcde11266 100644 --- a/src/llmq/quorums_chainlocks.cpp +++ b/src/llmq/quorums_chainlocks.cpp @@ -345,6 +345,21 @@ void CChainLocksHandler::TrySignChainTip() quorumSigningManager->AsyncSignIfMember(Params().GetConsensus().llmqChainLocks, requestId, msgHash); } +void CChainLocksHandler::TransactionAddedToMempool(const CTransactionRef& tx) +{ + +} + +void CChainLocksHandler::BlockConnected(const std::shared_ptr& pblock, const CBlockIndex* pindex, const std::vector& vtxConflicted) +{ + +} + +void CChainLocksHandler::BlockDisconnected(const std::shared_ptr& pblock, const CBlockIndex* pindexDisconnected) +{ + +} + void CChainLocksHandler::SyncTransaction(const CTransactionRef& tx, const CBlockIndex* pindex, int posInBlock) { if (!masternodeSync.IsBlockchainSynced()) { diff --git a/src/llmq/quorums_chainlocks.h b/src/llmq/quorums_chainlocks.h index 148fdf35d..684a4b838 100644 --- a/src/llmq/quorums_chainlocks.h +++ b/src/llmq/quorums_chainlocks.h @@ -90,6 +90,9 @@ public: void ProcessNewChainLock(NodeId from, const CChainLockSig& clsig, const uint256& hash); void AcceptedBlockHeader(const CBlockIndex* pindexNew); void UpdatedBlockTip(const CBlockIndex* pindexNew); + void TransactionAddedToMempool(const CTransactionRef& tx); + void BlockConnected(const std::shared_ptr& pblock, const CBlockIndex* pindex, const std::vector& vtxConflicted); + void BlockDisconnected(const std::shared_ptr& pblock, const CBlockIndex* pindexDisconnected); void SyncTransaction(const CTransactionRef& tx, const CBlockIndex* pindex = nullptr, int posInBlock = 0); void CheckActiveState(); void TrySignChainTip();