mirror of
https://github.com/dashpay/dash.git
synced 2024-12-26 20:42:59 +01:00
Use connman passed to ThreadSendAlert() instead of g_connman global. (#1610)
There is no reason to use g_connman global variable in ThreadSendAlert() because reference to CConnman instance is already passed to it as argument. This was overlooked when refactoring sendalert module, it's time to fix it. Signed-off-by: Oleg Girko <ol@infoserver.lv>
This commit is contained in:
parent
5617aef079
commit
91ae0b712a
@ -100,8 +100,8 @@ void ThreadSendAlert(CConnman& connman)
|
|||||||
printf("ThreadSendAlert() : Sending alert\n");
|
printf("ThreadSendAlert() : Sending alert\n");
|
||||||
int nSent = 0;
|
int nSent = 0;
|
||||||
{
|
{
|
||||||
g_connman->ForEachNode([&alert2, &nSent](CNode* pnode) {
|
connman.ForEachNode([&alert2, &connman, &nSent](CNode* pnode) {
|
||||||
if (alert2.RelayTo(pnode, *g_connman))
|
if (alert2.RelayTo(pnode, connman))
|
||||||
{
|
{
|
||||||
printf("ThreadSendAlert() : Sent alert to %s\n", pnode->addr.ToString().c_str());
|
printf("ThreadSendAlert() : Sent alert to %s\n", pnode->addr.ToString().c_str());
|
||||||
nSent++;
|
nSent++;
|
||||||
|
Loading…
Reference in New Issue
Block a user