Only submit purged transactions if there are node servers attached.
This commit is contained in:
parent
b83b674610
commit
970a281ee3
@ -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;
|
||||
}
|
||||
|
||||
@ -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
|
||||
|
||||
|
||||
@ -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);
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user