diff options
author | moneromooo-monero <moneromooo-monero@users.noreply.github.com> | 2015-08-13 16:33:28 +0100 |
---|---|---|
committer | moneromooo-monero <moneromooo-monero@users.noreply.github.com> | 2015-08-13 16:33:28 +0100 |
commit | d87a2d2bb2c83de9bf46d67274a760c05ff19bb9 (patch) | |
tree | 53eb9555cfc7412100b4bead612d66f5f54c71f6 /src/rpc | |
parent | Merge pull request #365 (diff) | |
download | monero-d87a2d2bb2c83de9bf46d67274a760c05ff19bb9.tar.xz |
core_rpc_server: replace vector<bool> with vector<int> in RPC
vector<bool> causes issues in serialization with Boost 1.56
Diffstat (limited to 'src/rpc')
-rw-r--r-- | src/rpc/core_rpc_server.cpp | 6 | ||||
-rw-r--r-- | src/rpc/core_rpc_server_commands_defs.h | 2 |
2 files changed, 6 insertions, 2 deletions
diff --git a/src/rpc/core_rpc_server.cpp b/src/rpc/core_rpc_server.cpp index 0c8384306..3743fca3a 100644 --- a/src/rpc/core_rpc_server.cpp +++ b/src/rpc/core_rpc_server.cpp @@ -259,12 +259,16 @@ namespace cryptonote } key_images.push_back(*reinterpret_cast<const crypto::key_image*>(b.data())); } - bool r = m_core.are_key_images_spent(key_images, res.spent_status); + std::vector<bool> spent_status; + bool r = m_core.are_key_images_spent(key_images, spent_status); if(!r) { res.status = "Failed"; return true; } + res.spent_status.clear(); + for (size_t n = 0; n < spent_status.size(); ++n) + res.spent_status.push_back(spent_status[n]); res.status = CORE_RPC_STATUS_OK; return true; diff --git a/src/rpc/core_rpc_server_commands_defs.h b/src/rpc/core_rpc_server_commands_defs.h index beb7b81e6..b2fdd9930 100644 --- a/src/rpc/core_rpc_server_commands_defs.h +++ b/src/rpc/core_rpc_server_commands_defs.h @@ -131,7 +131,7 @@ namespace cryptonote struct response { - std::vector<bool> spent_status; + std::vector<int> spent_status; std::string status; BEGIN_KV_SERIALIZE_MAP() |