diff --git a/src/CryptoNoteCore/Core.cpp b/src/CryptoNoteCore/Core.cpp index 01b8716109..27871a2b82 100755 --- a/src/CryptoNoteCore/Core.cpp +++ b/src/CryptoNoteCore/Core.cpp @@ -594,6 +594,7 @@ bool Core::getWalletSyncData( /* Current height */ uint64_t currentIndex = mainChain->getTopBlockIndex(); + Crypto::Hash currentHash = mainChain->getTopBlockHash(); uint64_t actualBlockCount = std::min(BLOCKS_SYNCHRONIZING_DEFAULT_COUNT, blockCount); @@ -707,6 +708,12 @@ bool Core::getWalletSyncData( walletBlocks.push_back(walletBlock); } + if (walletBlocks.empty()) + { + topBlockInfo->height = currentIndex; + topBlockInfo->hash = currentHash; + } + return true; } catch (std::exception &e) diff --git a/src/Rpc/RpcServer.cpp b/src/Rpc/RpcServer.cpp index c3d6132552..9e15a616b3 100755 --- a/src/Rpc/RpcServer.cpp +++ b/src/Rpc/RpcServer.cpp @@ -370,6 +370,8 @@ bool RpcServer::on_get_wallet_sync_data(const COMMAND_RPC_GET_WALLET_SYNC_DATA:: res.topBlock ); + res.synced = res.items.empty(); + if (!success) { res.status = "Failed to perform query";