Skip to content

Commit 08a3a18

Browse files
UdjinM6PastaPastaPasta
authored andcommitted
refactor: avoid passing unused proactive_relay to CZMQAbstractNotifier
1 parent a57a811 commit 08a3a18

File tree

6 files changed

+10
-10
lines changed

6 files changed

+10
-10
lines changed

src/zmq/zmqabstractnotifier.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ bool CZMQAbstractNotifier::NotifyInstantSendDoubleSpendAttempt(const CTransactio
6868
return true;
6969
}
7070

71-
bool CZMQAbstractNotifier::NotifyRecoveredSig(const std::shared_ptr<const llmq::CRecoveredSig> & /*sig*/, bool /*proactive_relay*/)
71+
bool CZMQAbstractNotifier::NotifyRecoveredSig(const std::shared_ptr<const llmq::CRecoveredSig> & /*sig*/)
7272
{
7373
return true;
7474
}

src/zmq/zmqabstractnotifier.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ class CZMQAbstractNotifier
7575
virtual bool NotifyGovernanceVote(const std::shared_ptr<CDeterministicMNList>& tip_mn_list, const std::shared_ptr<const CGovernanceVote>& vote);
7676
virtual bool NotifyGovernanceObject(const std::shared_ptr<const Governance::Object>& object);
7777
virtual bool NotifyInstantSendDoubleSpendAttempt(const CTransactionRef& currentTx, const CTransactionRef& previousTx);
78-
virtual bool NotifyRecoveredSig(const std::shared_ptr<const llmq::CRecoveredSig>& sig, bool proactive_relay);
78+
virtual bool NotifyRecoveredSig(const std::shared_ptr<const llmq::CRecoveredSig>& sig);
7979

8080
protected:
8181
void *psocket;

src/zmq/zmqnotificationinterface.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -241,10 +241,10 @@ void CZMQNotificationInterface::NotifyInstantSendDoubleSpendAttempt(const CTrans
241241
});
242242
}
243243

244-
void CZMQNotificationInterface::NotifyRecoveredSig(const std::shared_ptr<const llmq::CRecoveredSig>& sig, bool proactive_relay)
244+
void CZMQNotificationInterface::NotifyRecoveredSig(const std::shared_ptr<const llmq::CRecoveredSig>& sig, bool /*proactive_relay*/)
245245
{
246-
TryForEachAndRemoveFailed(notifiers, [&sig, proactive_relay](CZMQAbstractNotifier* notifier) {
247-
return notifier->NotifyRecoveredSig(sig, proactive_relay);
246+
TryForEachAndRemoveFailed(notifiers, [&sig](CZMQAbstractNotifier* notifier) {
247+
return notifier->NotifyRecoveredSig(sig);
248248
});
249249
}
250250

src/zmq/zmqnotificationinterface.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ class CZMQNotificationInterface final : public CValidationInterface
3636
void NotifyGovernanceVote(const std::shared_ptr<CDeterministicMNList>& tip_mn_list, const std::shared_ptr<const CGovernanceVote>& vote) override;
3737
void NotifyGovernanceObject(const std::shared_ptr<const Governance::Object>& object) override;
3838
void NotifyInstantSendDoubleSpendAttempt(const CTransactionRef& currentTx, const CTransactionRef& previousTx) override;
39-
void NotifyRecoveredSig(const std::shared_ptr<const llmq::CRecoveredSig>& sig, bool proactive_relay) override;
39+
void NotifyRecoveredSig(const std::shared_ptr<const llmq::CRecoveredSig>& sig, bool /*proactive_relay*/) override;
4040

4141
private:
4242
CZMQNotificationInterface();

src/zmq/zmqpublishnotifier.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -296,7 +296,7 @@ bool CZMQPublishHashInstantSendDoubleSpendNotifier::NotifyInstantSendDoubleSpend
296296
&& SendZmqMessage(MSG_HASHISCON, dataPreviousHash, 32);
297297
}
298298

299-
bool CZMQPublishHashRecoveredSigNotifier::NotifyRecoveredSig(const std::shared_ptr<const llmq::CRecoveredSig> &sig, bool proactive_relay)
299+
bool CZMQPublishHashRecoveredSigNotifier::NotifyRecoveredSig(const std::shared_ptr<const llmq::CRecoveredSig> &sig)
300300
{
301301
LogPrint(BCLog::ZMQ, "Publish hashrecoveredsig %s to %s\n", sig->getMsgHash().ToString(), this->address);
302302
char data[32];
@@ -462,7 +462,7 @@ bool CZMQPublishRawInstantSendDoubleSpendNotifier::NotifyInstantSendDoubleSpendA
462462
&& SendZmqMessage(MSG_RAWISCON, &(*ssPrevious.begin()), ssPrevious.size());
463463
}
464464

465-
bool CZMQPublishRawRecoveredSigNotifier::NotifyRecoveredSig(const std::shared_ptr<const llmq::CRecoveredSig>& sig, bool proactive_relay)
465+
bool CZMQPublishRawRecoveredSigNotifier::NotifyRecoveredSig(const std::shared_ptr<const llmq::CRecoveredSig>& sig)
466466
{
467467
LogPrint(BCLog::ZMQ, "Publish rawrecoveredsig %s to %s\n", sig->getMsgHash().ToString(), this->address);
468468

src/zmq/zmqpublishnotifier.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ class CZMQPublishHashInstantSendDoubleSpendNotifier : public CZMQAbstractPublish
8181
class CZMQPublishHashRecoveredSigNotifier : public CZMQAbstractPublishNotifier
8282
{
8383
public:
84-
bool NotifyRecoveredSig(const std::shared_ptr<const llmq::CRecoveredSig>&, bool proactive_relay) override;
84+
bool NotifyRecoveredSig(const std::shared_ptr<const llmq::CRecoveredSig>&) override;
8585
};
8686

8787
class CZMQPublishRawBlockNotifier : public CZMQAbstractPublishNotifier
@@ -150,6 +150,6 @@ class CZMQPublishRawInstantSendDoubleSpendNotifier : public CZMQAbstractPublishN
150150
class CZMQPublishRawRecoveredSigNotifier : public CZMQAbstractPublishNotifier
151151
{
152152
public:
153-
bool NotifyRecoveredSig(const std::shared_ptr<const llmq::CRecoveredSig> &sig, bool proactive_relay) override;
153+
bool NotifyRecoveredSig(const std::shared_ptr<const llmq::CRecoveredSig> &sig) override;
154154
};
155155
#endif // BITCOIN_ZMQ_ZMQPUBLISHNOTIFIER_H

0 commit comments

Comments
 (0)