From ee367cc5f2ea1dd9806b690811b3ec818775ae5a Mon Sep 17 00:00:00 2001 From: woodser Date: Sun, 14 Jul 2019 10:29:47 -0400 Subject: [PATCH] support tx request height uint32_t -> uin64_t --- src/utils/MoneroUtils.cpp | 5 +++-- src/wallet/MoneroWalletModel.cpp | 3 ++- src/wallet/MoneroWalletModel.h | 1 + submodules/monero-core | 2 +- 4 files changed, 7 insertions(+), 4 deletions(-) diff --git a/src/utils/MoneroUtils.cpp b/src/utils/MoneroUtils.cpp index 81284d6..88aab14 100644 --- a/src/utils/MoneroUtils.cpp +++ b/src/utils/MoneroUtils.cpp @@ -243,8 +243,9 @@ shared_ptr nodeToTxRequest(const boost::property_tree::ptree& n else if (key == string("txIds")) for (boost::property_tree::ptree::const_iterator it2 = it->second.begin(); it2 != it->second.end(); ++it2) txRequest->txIds.push_back(it2->second.data()); else if (key == string("hasPaymentId")) txRequest->hasPaymentId = stringToBool(it->second.data()); else if (key == string("paymentIds")) for (boost::property_tree::ptree::const_iterator it2 = it->second.begin(); it2 != it->second.end(); ++it2) txRequest->paymentIds.push_back(it2->second.data()); - else if (key == string("minHeight")) txRequest->minHeight = it->second.get_value(); - else if (key == string("maxHeight")) txRequest->maxHeight = it->second.get_value(); + else if (key == string("height")) txRequest->height = it->second.get_value(); + else if (key == string("minHeight")) txRequest->minHeight = it->second.get_value(); + else if (key == string("maxHeight")) txRequest->maxHeight = it->second.get_value(); else if (key == string("includeOutputs")) txRequest->includeOutputs = stringToBool(it->second.data()); else if (key == string("transferRequest")) txRequest->transferRequest = nodeToTransferRequest(it->second); else if (key == string("outputRequest")) txRequest->outputRequest = nodeToOutputRequest(it->second); diff --git a/src/wallet/MoneroWalletModel.cpp b/src/wallet/MoneroWalletModel.cpp index 004d725..f0e3727 100644 --- a/src/wallet/MoneroWalletModel.cpp +++ b/src/wallet/MoneroWalletModel.cpp @@ -179,6 +179,7 @@ namespace monero { if (!txIds.empty()) node.add_child("txIds", MoneroUtils::toPropertyTree(txIds)); if (hasPaymentId != boost::none) node.put("hasPaymentId", *hasPaymentId); if (!paymentIds.empty()) node.add_child("paymentIds", MoneroUtils::toPropertyTree(paymentIds)); + if (height != boost::none) node.put("height", *height); if (minHeight != boost::none) node.put("minHeight", *minHeight); if (maxHeight != boost::none) node.put("maxHeight", *maxHeight); if (includeOutputs != boost::none) node.put("includeOutputs", *includeOutputs); @@ -243,7 +244,7 @@ namespace monero { boost::optional txHeight = tx->getHeight(); if (!txIds.empty() && find(txIds.begin(), txIds.end(), *tx->id) == txIds.end()) return false; if (!paymentIds.empty() && (tx->paymentId == boost::none || find(paymentIds.begin(), paymentIds.end(), *tx->paymentId) == paymentIds.end())) return false; - if (getHeight() != boost::none && (txHeight == boost::none || *txHeight != *getHeight())) return false; + if (height != boost::none && (txHeight == boost::none || *txHeight != *height)) return false; if (minHeight != boost::none && (txHeight == boost::none || *txHeight < *minHeight)) return false; if (maxHeight != boost::none && (txHeight == boost::none || *txHeight > *maxHeight)) return false; diff --git a/src/wallet/MoneroWalletModel.h b/src/wallet/MoneroWalletModel.h index 6b04d23..1226ac9 100644 --- a/src/wallet/MoneroWalletModel.h +++ b/src/wallet/MoneroWalletModel.h @@ -257,6 +257,7 @@ namespace monero { vector txIds; boost::optional hasPaymentId; vector paymentIds; + boost::optional height; boost::optional minHeight; boost::optional maxHeight; boost::optional includeOutputs; diff --git a/submodules/monero-core b/submodules/monero-core index 6335509..9d7107c 160000 --- a/submodules/monero-core +++ b/submodules/monero-core @@ -1 +1 @@ -Subproject commit 6335509727661349e50c54c4e0eafd692f0d6907 +Subproject commit 9d7107c870d88885f43a8fd65739b1b70a5af668