Browse Source

Don't automatically use #getcbaddr for local bitcoind if the user provided their own

Luke Dashjr 11 years ago
parent
commit
ed59c45948
1 changed files with 3 additions and 1 deletions
  1. 3 1
      miner.c

+ 3 - 1
miner.c

@@ -11009,9 +11009,11 @@ err:
 	if (rpcssl == -101)
 		rpcssl = 0;
 	
+	const bool have_cbaddr = bytes_len(&opt_coinbase_script);
+	
 	const int uri_sz = 0x30;
 	char * const uri = malloc(uri_sz);
-	snprintf(uri, uri_sz, "http%s://localhost:%d/#getcbaddr#allblocks", rpcssl ? "s" : "", rpcport);
+	snprintf(uri, uri_sz, "http%s://localhost:%d/%s#allblocks", rpcssl ? "s" : "", rpcport, have_cbaddr ? "" : "#getcbaddr");
 	
 	applog(LOG_DEBUG, "Local bitcoin RPC server on port %d found in %s", rpcport, filepath);