|
|
@ -153,7 +153,8 @@ retry: |
|
|
|
keep_sockalive(cs->fd); |
|
|
|
keep_sockalive(cs->fd); |
|
|
|
|
|
|
|
|
|
|
|
/* Test we can connect, authorise and get a block template */ |
|
|
|
/* Test we can connect, authorise and get a block template */ |
|
|
|
gbt = si->data; |
|
|
|
gbt = ckzalloc(sizeof(gbtbase_t)); |
|
|
|
|
|
|
|
si->data = gbt; |
|
|
|
if (!gen_gbtbase(cs, gbt)) { |
|
|
|
if (!gen_gbtbase(cs, gbt)) { |
|
|
|
LOGINFO("Failed to get test block template from %s:%s!", |
|
|
|
LOGINFO("Failed to get test block template from %s:%s!", |
|
|
|
cs->url, cs->port); |
|
|
|
cs->url, cs->port); |
|
|
@ -1298,15 +1299,11 @@ static int server_mode(ckpool_t *ckp, proc_instance_t *pi) |
|
|
|
|
|
|
|
|
|
|
|
ckp->servers = ckalloc(sizeof(server_instance_t *) * ckp->btcds); |
|
|
|
ckp->servers = ckalloc(sizeof(server_instance_t *) * ckp->btcds); |
|
|
|
for (i = 0; i < ckp->btcds; i++) { |
|
|
|
for (i = 0; i < ckp->btcds; i++) { |
|
|
|
gbtbase_t *gbt; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
ckp->servers[i] = ckzalloc(sizeof(server_instance_t)); |
|
|
|
ckp->servers[i] = ckzalloc(sizeof(server_instance_t)); |
|
|
|
si = ckp->servers[i]; |
|
|
|
si = ckp->servers[i]; |
|
|
|
si->url = ckp->btcdurl[i]; |
|
|
|
si->url = ckp->btcdurl[i]; |
|
|
|
si->auth = ckp->btcdauth[i]; |
|
|
|
si->auth = ckp->btcdauth[i]; |
|
|
|
si->pass = ckp->btcdpass[i]; |
|
|
|
si->pass = ckp->btcdpass[i]; |
|
|
|
gbt = ckzalloc(sizeof(gbtbase_t)); |
|
|
|
|
|
|
|
si->data = gbt; |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
ret = gen_loop(pi); |
|
|
|
ret = gen_loop(pi); |
|
|
|