mirror of
https://github.com/dashpay/dash.git
synced 2024-12-25 12:02:48 +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");
|
||||
int nSent = 0;
|
||||
{
|
||||
g_connman->ForEachNode([&alert2, &nSent](CNode* pnode) {
|
||||
if (alert2.RelayTo(pnode, *g_connman))
|
||||
connman.ForEachNode([&alert2, &connman, &nSent](CNode* pnode) {
|
||||
if (alert2.RelayTo(pnode, connman))
|
||||
{
|
||||
printf("ThreadSendAlert() : Sent alert to %s\n", pnode->addr.ToString().c_str());
|
||||
nSent++;
|
||||
|
Loading…
Reference in New Issue
Block a user