diff --git a/src/ckpool.c b/src/ckpool.c index 32e259bb..abe3f0d9 100644 --- a/src/ckpool.c +++ b/src/ckpool.c @@ -1336,6 +1336,7 @@ static void parse_nodeservers(ckpool_t *ckp, const json_t *arr_val) if (!_json_get_string(&ckp->serverurl[j], val, "nodeserver")) LOGWARNING("Invalid nodeserver entry number %d", i); ckp->nodeserver[j] = true; + ckp->nodeservers++; } ckp->serverurls = total_urls; } diff --git a/src/ckpool.h b/src/ckpool.h index 62d1cab5..61faad3f 100644 --- a/src/ckpool.h +++ b/src/ckpool.h @@ -263,6 +263,7 @@ struct ckpool_instance { int serverurls; // Number of server bindings bool *server_highdiff; // If this server is highdiff bool *nodeserver; // If this server URL serves node information + int nodeservers; // If this server has remote node servers bool *trusted; // If this server URL accepts trusted remote nodes char *upstream; // Upstream pool in trusted remote mode diff --git a/src/stratifier.c b/src/stratifier.c index 13a0af01..9e22b8b5 100644 --- a/src/stratifier.c +++ b/src/stratifier.c @@ -1302,7 +1302,7 @@ static void update_txns(ckpool_t *ckp, sdata_t *sdata, txntable_t *txns, bool lo * case they've been removed from its mempool as well and we need them * again in the future for a remote workinfo that hasn't forgotten * about them. */ - if (purged) + if (purged && ckp->nodeservers) submit_transaction_array(ckp, purged_txns); json_decref(purged_txns);