From 75c14c8b4589f9d919624b14a43c34d0c604ed85 Mon Sep 17 00:00:00 2001 From: who asks? Date: Thu, 18 Jul 2024 21:18:56 -0600 Subject: [PATCH] final modifications to adding endpoints import_encrypted_key_images and export_encrypted_key_images --- src/wallet/wallet_rpc_server.cpp | 12 ------------ src/wallet/wallet_rpc_server_commands_defs.h | 2 +- 2 files changed, 1 insertion(+), 13 deletions(-) diff --git a/src/wallet/wallet_rpc_server.cpp b/src/wallet/wallet_rpc_server.cpp index 5c553aa71..7976cb7af 100644 --- a/src/wallet/wallet_rpc_server.cpp +++ b/src/wallet/wallet_rpc_server.cpp @@ -3021,19 +3021,7 @@ bool wallet_rpc_server::on_import_encrypted_key_images(const wallet_rpc::COMMAND return false; } - - std::cout << "encrypted_key_images_blob: " << req.encrypted_key_images_blob << std::endl; - std::cout << "data: " << data << std::endl; - // Debug: Print the first few bytes of the decoded data - std::cout << "First 32 bytes of decoded data: "; - for (size_t i = 0; i < std::min(data.size(), size_t(32)); ++i) { - std::cout << std::hex << std::setw(2) << std::setfill('0') << (int)(unsigned char)data[i]; - } - std::cout << std::endl; - const size_t magiclen = strlen(KEY_IMAGE_EXPORT_FILE_MAGIC); - std::cout << "Magic length: " << magiclen << std::endl; - std::cout << "Expected magic: "; if (data.size() < magiclen || memcmp(data.data(), KEY_IMAGE_EXPORT_FILE_MAGIC, magiclen)) { er.code = WALLET_RPC_ERROR_CODE_WRONG_KEY_IMAGE; diff --git a/src/wallet/wallet_rpc_server_commands_defs.h b/src/wallet/wallet_rpc_server_commands_defs.h index 85866307f..42b43a26b 100644 --- a/src/wallet/wallet_rpc_server_commands_defs.h +++ b/src/wallet/wallet_rpc_server_commands_defs.h @@ -1858,7 +1858,7 @@ namespace tools BEGIN_KV_SERIALIZE_MAP() KV_SERIALIZE_OPT(offset, (uint32_t)0) - KV_SERIALIZE_OPT(encrypted_key_images_blob, "WTF") + KV_SERIALIZE(encrypted_key_images_blob) END_KV_SERIALIZE_MAP() }; typedef epee::misc_utils::struct_init request;