From d58700e003ab3126fd21cb6df0a9a27365f5fc02 Mon Sep 17 00:00:00 2001 From: Jaquee Date: Fri, 18 Aug 2017 14:29:34 +0200 Subject: [PATCH] WalletAPI: only allow trusted daemon when importing key images --- src/wallet/api/wallet.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/wallet/api/wallet.cpp b/src/wallet/api/wallet.cpp index 06e9019cf..7afc1f449 100644 --- a/src/wallet/api/wallet.cpp +++ b/src/wallet/api/wallet.cpp @@ -889,6 +889,11 @@ bool WalletImpl::exportKeyImages(const string &filename) bool WalletImpl::importKeyImages(const string &filename) { + if (!trustedDaemon()) { + m_status = Status_Error; + m_errorString = tr("Key images can only be imported with a trusted daemon"); + return false; + } try { uint64_t spent = 0, unspent = 0;