From b5f0eee1ff3e066648c53c0112c3dbd1113eb2f4 Mon Sep 17 00:00:00 2001 From: Duke Leto Date: Fri, 30 Sep 2022 08:38:28 -0400 Subject: [PATCH] Add method to call the rescan RPC --- src/rpc.cpp | 5 +++++ src/rpc.h | 1 + 2 files changed, 6 insertions(+) diff --git a/src/rpc.cpp b/src/rpc.cpp index 73610cd..2e4e231 100644 --- a/src/rpc.cpp +++ b/src/rpc.cpp @@ -141,6 +141,11 @@ void RPC::getTAddresses(const std::function& cb) { conn->doRPCWithDefaultErrorHandling(makePayload(method, ""), cb); } +void RPC::rescan(const std::function& cb) { + QString method = "rescan"; + conn->doRPCWithDefaultErrorHandling(makePayload(method), cb); +} + void RPC::getZAddresses(const std::function& cb) { QString method = "z_listaddresses"; conn->doRPCWithDefaultErrorHandling(makePayload(method), cb); diff --git a/src/rpc.h b/src/rpc.h index c5ede99..e31d8e8 100644 --- a/src/rpc.h +++ b/src/rpc.h @@ -138,6 +138,7 @@ private: void getPeerInfo (const std::function& cb); void getZAddresses (const std::function& cb); void getTAddresses (const std::function& cb); + void rescan (const std::function& cb); Connection* conn = nullptr; std::shared_ptr ehushd = nullptr;