From cfa582bd007e2d950231b9fce1e69abb5db03498 Mon Sep 17 00:00:00 2001 From: Jianping Wu Date: Wed, 21 Nov 2018 13:09:28 -0800 Subject: [PATCH] Added op name in keva_pending output. --- src/wallet/rpckeva.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/wallet/rpckeva.cpp b/src/wallet/rpckeva.cpp index 3754d968e..9581d0a15 100644 --- a/src/wallet/rpckeva.cpp +++ b/src/wallet/rpckeva.cpp @@ -387,9 +387,12 @@ UniValue keva_pending(const JSONRPCRequest& request) mempool.getUnconfirmedKeyValueList(unconfirmedKeyValueList, nameSpace); UniValue arr(UniValue::VARR); + const std::string opKevaNamepsace = "keva_namespace"; + const std::string opKevaPut = "keva_put"; for (auto entry: unconfirmedNamespaces) { UniValue obj(UniValue::VOBJ); + obj.pushKV("op", opKevaNamepsace); obj.pushKV("namespace", EncodeBase58(std::get<0>(entry))); obj.pushKV("display name", ValtypeToString(std::get<1>(entry))); obj.pushKV("txid", std::get<2>(entry).ToString()); @@ -398,6 +401,7 @@ UniValue keva_pending(const JSONRPCRequest& request) for (auto entry: unconfirmedKeyValueList) { UniValue obj(UniValue::VOBJ); + obj.pushKV("op", opKevaPut); obj.pushKV("namespace", EncodeBase58(std::get<0>(entry))); obj.pushKV("key", ValtypeToString(std::get<1>(entry))); obj.pushKV("value", ValtypeToString(std::get<2>(entry)));