Browse Source

Failure to get a response to getrawtransaction gives a http error even though it then gives a meaningful response. Drop warning to debug in get_txn.

master
Con Kolivas 8 years ago
parent
commit
32499cf34e
  1. 6
      src/bitcoin.c

6
src/bitcoin.c

@ -385,12 +385,12 @@ char *get_txn(connsock_t *cs, const char *hash)
ASPRINTF(&rpc_req, "{\"method\": \"getrawtransaction\", \"params\": [\"%s\"]}\n", hash); ASPRINTF(&rpc_req, "{\"method\": \"getrawtransaction\", \"params\": [\"%s\"]}\n", hash);
val = json_rpc_response(cs, rpc_req); val = json_rpc_response(cs, rpc_req);
dealloc(rpc_req); dealloc(rpc_req);
if (unlikely(!val)) { if (!val) {
LOGWARNING("%s:%s Failed to get valid json response to get_txn", cs->url, cs->port); LOGDEBUG("%s:%s Failed to get valid json response to get_txn", cs->url, cs->port);
goto out; goto out;
} }
res_val = json_object_get(val, "result"); res_val = json_object_get(val, "result");
if (!json_is_null(res_val) && json_is_string(res_val)) { if (res_val && !json_is_null(res_val) && json_is_string(res_val)) {
ret = strdup(json_string_value(res_val)); ret = strdup(json_string_value(res_val));
LOGDEBUG("get_txn for hash %s got data %s", hash, ret); LOGDEBUG("get_txn for hash %s got data %s", hash, ret);
} else } else

Loading…
Cancel
Save