|
@@ -2926,14 +2926,18 @@ void refresh_bitcoind_address(const bool fresh)
|
|
|
json_decref(json);
|
|
json_decref(json);
|
|
|
continue;
|
|
continue;
|
|
|
}
|
|
}
|
|
|
|
|
+ cg_ilock(&control_lock);
|
|
|
if (bytes_eq(&newscript, &opt_coinbase_script))
|
|
if (bytes_eq(&newscript, &opt_coinbase_script))
|
|
|
{
|
|
{
|
|
|
|
|
+ cg_iunlock(&control_lock);
|
|
|
applog(LOG_DEBUG, "Pool %d returned coinbase address already in use (%s)", pool->pool_no, s);
|
|
applog(LOG_DEBUG, "Pool %d returned coinbase address already in use (%s)", pool->pool_no, s);
|
|
|
json_decref(json);
|
|
json_decref(json);
|
|
|
break;
|
|
break;
|
|
|
}
|
|
}
|
|
|
|
|
+ cg_ulock(&control_lock);
|
|
|
bytes_assimilate(&opt_coinbase_script, &newscript);
|
|
bytes_assimilate(&opt_coinbase_script, &newscript);
|
|
|
coinbase_script_block_id = current_block_id;
|
|
coinbase_script_block_id = current_block_id;
|
|
|
|
|
+ cg_wunlock(&control_lock);
|
|
|
applog(LOG_NOTICE, "Now using coinbase address %s, provided by pool %d", s, pool->pool_no);
|
|
applog(LOG_NOTICE, "Now using coinbase address %s, provided by pool %d", s, pool->pool_no);
|
|
|
json_decref(json);
|
|
json_decref(json);
|
|
|
break;
|
|
break;
|