wallet_rpc_server: do not use RPC data if the call failed

Found by codacy.com
This commit is contained in:
moneromooo-monero 2018-11-23 14:20:08 +00:00
parent 1a0733e534
commit aee7a4e364
No known key found for this signature in database
GPG Key ID: 686F07454D6CEFC3

View File

@ -2891,6 +2891,7 @@ namespace tools
cryptonote::COMMAND_RPC_GET_HEIGHT::response hres;
hres.height = 0;
bool r = wal->invoke_http_json("/getheight", hreq, hres);
if (r)
wal->set_refresh_from_block_height(hres.height);
crypto::secret_key dummy_key;
try {