mirror of
https://github.com/wownero/wownero.git
synced 2026-10-21 01:18:35 +02:00
wallet_rpc_server: do not use RPC data if the call failed
Found by codacy.com
This commit is contained in:
@@ -2891,7 +2891,8 @@ namespace tools
|
|||||||
cryptonote::COMMAND_RPC_GET_HEIGHT::response hres;
|
cryptonote::COMMAND_RPC_GET_HEIGHT::response hres;
|
||||||
hres.height = 0;
|
hres.height = 0;
|
||||||
bool r = wal->invoke_http_json("/getheight", hreq, hres);
|
bool r = wal->invoke_http_json("/getheight", hreq, hres);
|
||||||
wal->set_refresh_from_block_height(hres.height);
|
if (r)
|
||||||
|
wal->set_refresh_from_block_height(hres.height);
|
||||||
crypto::secret_key dummy_key;
|
crypto::secret_key dummy_key;
|
||||||
try {
|
try {
|
||||||
wal->generate(wallet_file, req.password, dummy_key, false, false);
|
wal->generate(wallet_file, req.password, dummy_key, false, false);
|
||||||
|
|||||||
Reference in New Issue
Block a user