Fix bug where SMART_CHAIN_SYMBOL was being used before being set, which caused custom addnodes to not be used and made the full node unable to sync
This commit is contained in:
@@ -1797,8 +1797,10 @@ void hush_args(char *argv0)
|
||||
|
||||
vector<string> HUSH_nodes = {};
|
||||
// Only HUSH3 and DRAGONX connect to these by default, other HACs must opt-in via -connect/-addnode
|
||||
const bool ishush3 = strncmp(SMART_CHAIN_SYMBOL, "HUSH3",5) == 0 ? true : false;
|
||||
const bool isdragonx = strncmp(SMART_CHAIN_SYMBOL, "DRAGONX",7) == 0 ? true : false;
|
||||
const bool ishush3 = strncmp(name.c_str(), "HUSH3",5) == 0 ? true : false;
|
||||
const bool isdragonx = strncmp(name.c_str(), "DRAGONX",7) == 0 ? true : false;
|
||||
|
||||
LogPrint("net", "%s: ishush3=%d isdragonx=%d\n", __func__, ishush3, isdragonx);
|
||||
if (ishush3 || isdragonx) {
|
||||
HUSH_nodes = {"node1.hush.is","node2.hush.is","node3.hush.is",
|
||||
"node4.hush.is","node5.hush.is","node6.hush.is",
|
||||
@@ -1813,6 +1815,7 @@ void hush_args(char *argv0)
|
||||
}
|
||||
// Add default HUSH nodes after custom addnodes, if applicable
|
||||
if(HUSH_nodes.size() > 0) {
|
||||
LogPrint("net", "%s: adding %d hostname-based nodes\n", __func__, HUSH_nodes.size() );
|
||||
more_nodes.insert( more_nodes.end(), HUSH_nodes.begin(), HUSH_nodes.end() );
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user