Hi,
I am developing a web application and using bitcoind to accept and pay with bitcoin, i have one page to create new address on demand for users and another page where user can withdraw bitcoins.
The problem is with the sentoaddress rpc command, i have a queue of withdrawals, i iterate thw queue and call the rpc command sendtoaddress but after 2 or 3 commands the bitcoind frezze, i'm using java (spring mvc) and to connect to bitcoind i'm using apache httpclient.
for (Retiro retiro : retiros) {
HttpClient httpClient = HttpClients.createDefault();
HttpPost httpPost = new HttpPost(urlCnx);
String enviar = "{\"method\": \"sendtoaddress\",\"params\": [\"" + retiro.getDireccion() + "\"," + retiro.getMonto() + "],\"id\":\"0\"}";
StringEntity entidadEnvio = new StringEntity(enviar);
httpPost = new HttpPost(urlCnx);
httpPost.setEntity(entidadEnvio);
HttpResponse respuestaEnviar = httpClient.execute(httpPost);
Object objeto = gson.fromJson(getReader(respuestaEnviar.getEntity().getContent()), Object.class);
}
Please any suggestions