From ded38e74de89acd84907c85dda6ec67a88cd9c3e Mon Sep 17 00:00:00 2001 From: sawtoothgeek Date: Sun, 3 Jun 2018 13:53:31 -0600 Subject: [PATCH] fix-start-servicenode-buttons: Applied this fix from BlockDX to XC, enables the snode startup buttons under the Servicenode Tab --- src/qt/servicenodelist.cpp | 16 ++++++++-------- src/servicenode.cpp | 5 +++-- src/test/transaction_tests.cpp | 2 ++ 3 files changed, 13 insertions(+), 10 deletions(-) diff --git a/src/qt/servicenodelist.cpp b/src/qt/servicenodelist.cpp index 2c97f6da8..47adf780f 100644 --- a/src/qt/servicenodelist.cpp +++ b/src/qt/servicenodelist.cpp @@ -24,7 +24,9 @@ ServicenodeList::ServicenodeList(QWidget* parent) : QWidget(parent), { ui->setupUi(this); - ui->startButton->setEnabled(false); + ui->startAllButton->setEnabled(true); + ui->startButton->setEnabled(true); + ui->startMissingButton->setEnabled(true); int columnAliasWidth = 100; int columnAddressWidth = 200; @@ -42,18 +44,16 @@ ServicenodeList::ServicenodeList(QWidget* parent) : QWidget(parent), ui->tableWidgetMyServicenodes->setContextMenuPolicy(Qt::CustomContextMenu); - //hided start alias buttons until fix/testing - ui->startAllButton->setVisible(false); - ui->startButton->setVisible(false); - ui->startMissingButton->setVisible(false); + ui->startAllButton->setVisible(true); + ui->startButton->setVisible(true); + ui->startMissingButton->setVisible(true); QAction* startAliasAction = new QAction(tr("Start alias"), this); contextMenu = new QMenu(); contextMenu->addAction(startAliasAction); - //hided hided start alias context menu until fix/testing -// connect(ui->tableWidgetMyServicenodes, SIGNAL(customContextMenuRequested(const QPoint&)), this, SLOT(showContextMenu(const QPoint&))); -// connect(startAliasAction, SIGNAL(triggered()), this, SLOT(on_startButton_clicked())); + connect(ui->tableWidgetMyServicenodes, SIGNAL(customContextMenuRequested(const QPoint&)), this, SLOT(showContextMenu(const QPoint&))); + connect(startAliasAction, SIGNAL(triggered()), this, SLOT(on_startButton_clicked())); timer = new QTimer(this); connect(timer, SIGNAL(timeout()), this, SLOT(updateMyNodeList())); diff --git a/src/servicenode.cpp b/src/servicenode.cpp index 877cd86ff..a6e4e2102 100644 --- a/src/servicenode.cpp +++ b/src/servicenode.cpp @@ -326,10 +326,11 @@ std::string CServicenode::GetStatus() bool CServicenode::IsValidNetAddr() { + SetReachable(Network::NET_IPV4, true); + // TODO: regtest is fine with any addresses for now, // should probably be a bit smarter if one day we start to implement tests for this - return Params().NetworkID() == CBaseChainParams::REGTEST || - (IsReachable(addr) && addr.IsRoutable()); + return Params().NetworkID() == CBaseChainParams::REGTEST || (IsReachable(addr) && addr.IsRoutable()); } CServicenodeBroadcast::CServicenodeBroadcast() diff --git a/src/test/transaction_tests.cpp b/src/test/transaction_tests.cpp index 4eb0f272c..22ac15344 100644 --- a/src/test/transaction_tests.cpp +++ b/src/test/transaction_tests.cpp @@ -22,6 +22,8 @@ #include #include "json/json_spirit_writer_template.h" +#define MAX_OP_RETURN_RELAY 10 + using namespace std; using namespace json_spirit; using namespace boost::algorithm;