From c17c3f9f1e9bff46a7e531333b79da62bd6e1de5 Mon Sep 17 00:00:00 2001 From: woodser Date: Fri, 7 Jun 2019 13:07:21 -0400 Subject: [PATCH] ready to serialize txs in block --- src/utils/MoneroUtils.h | 4 ++-- src/wallet/MoneroWallet.cpp | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/utils/MoneroUtils.h b/src/utils/MoneroUtils.h index 5f49b93..bcadb08 100644 --- a/src/utils/MoneroUtils.h +++ b/src/utils/MoneroUtils.h @@ -63,11 +63,11 @@ namespace MoneroUtils string serialize(const boost::property_tree::ptree& node); // // TODO: template implementation here, could move to MoneroUtils.hpp per https://stackoverflow.com/questions/3040480/c-template-function-compiles-in-header-but-not-implementation - template boost::property_tree::ptree toPropertyTree(const vector types) { + template boost::property_tree::ptree toPropertyTree(const vector types) { cout << "toPropertyTree(types)" << endl; boost::property_tree::ptree typeNodes; for (const auto& type : types) { - typeNodes.push_back(std::make_pair("", toPropertyTree(type))); + typeNodes.push_back(std::make_pair("", type.toPropertyTree())); } return typeNodes; } diff --git a/src/wallet/MoneroWallet.cpp b/src/wallet/MoneroWallet.cpp index 14f94b6..4215377 100644 --- a/src/wallet/MoneroWallet.cpp +++ b/src/wallet/MoneroWallet.cpp @@ -45,6 +45,7 @@ namespace monero { if (numUnspentOutputs != boost::none) node.put("numUnspentOutputs", *numUnspentOutputs); if (isUsed != boost::none) node.put("isUsed", *isUsed); if (numBlocksToUnlock != boost::none) node.put("numBlocksToUnlock", *numBlocksToUnlock); + return node; } boost::property_tree::ptree MoneroTxWallet::toPropertyTree() const {