ready to serialize txs in block

This commit is contained in:
woodser
2019-06-07 13:07:21 -04:00
parent e5fb07e2fc
commit c17c3f9f1e
2 changed files with 3 additions and 2 deletions
+2 -2
View File
@@ -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 <class T> boost::property_tree::ptree toPropertyTree(const vector<T> types) {
template <class SerializableStruct> boost::property_tree::ptree toPropertyTree(const vector<SerializableStruct> 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;
}
+1
View File
@@ -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 {