From: tobtoht Date: Wed, 23 Feb 2022 21:29:33 +0000 (+0100) Subject: Multibroadcast: broadcast to selected list X-Git-Url: https://git.nutra.tk/v1?a=commitdiff_plain;h=dac8769e7ef5a8f19e7ead583c072cbbef1ba277;p=gamesguru%2Ffeather.git Multibroadcast: broadcast to selected list --- diff --git a/src/appcontext.cpp b/src/appcontext.cpp index f33a194d..b204b6bd 100644 --- a/src/appcontext.cpp +++ b/src/appcontext.cpp @@ -145,9 +145,7 @@ void AppContext::onMultiBroadcast(PendingTransaction *tx) { for (quint64 i = 0; i < count; i++) { QString txData = tx->signedTxToHex(i); - for (const auto& node: this->nodes->websocketNodes()) { - if (!node.online) continue; - + for (const auto& node: this->nodes->nodes()) { QString address = node.toURL(); qDebug() << QString("Relaying %1 to: %2").arg(tx->txid()[i], address); m_rpc->setDaemonAddress(address); diff --git a/src/utils/nodes.cpp b/src/utils/nodes.cpp index f2e06e72..4b943372 100644 --- a/src/utils/nodes.cpp +++ b/src/utils/nodes.cpp @@ -472,6 +472,11 @@ void Nodes::WSNodeExhaustedWarning() { m_wsExhaustedWarningEmitted = true; } +QList Nodes::nodes() { + // Return current node list + return (this->source() == NodeSource::websocket) ? websocketNodes() : m_customNodes; +} + QList Nodes::customNodes() { return m_customNodes; } diff --git a/src/utils/nodes.h b/src/utils/nodes.h index 78f17a9b..1cbb2988 100644 --- a/src/utils/nodes.h +++ b/src/utils/nodes.h @@ -117,6 +117,7 @@ public: NodeSource source(); FeatherNode connection(); + QList nodes(); QList customNodes(); QList websocketNodes();