mirror of
https://github.com/wownero/wownero-cpp.git
synced 2026-10-21 17:18:44 +02:00
ready to switch to OO serialization
This commit is contained in:
@@ -150,6 +150,7 @@ boost::property_tree::ptree MoneroUtils::toPropertyTree(const MoneroBlock& block
|
||||
cout << "toPropertyTree(block)" << endl;
|
||||
boost::property_tree::ptree blockNode;
|
||||
if (block.height != boost::none) blockNode.put("height", *block.height); // TODO: finish this, add txs
|
||||
//blockNode.add_child("txs", toPropertyTree(block.txs)); // TODO: block.txs is vector<shared_ptr<MoneroTx>> so need to handle
|
||||
return blockNode;
|
||||
}
|
||||
|
||||
|
||||
@@ -84,6 +84,15 @@ namespace MoneroUtils
|
||||
return typeNodes;
|
||||
}
|
||||
|
||||
// template <class T*> boost::property_tree::ptree toPropertyTree(const vector<T*> types) {
|
||||
// cout << "toPropertyTree(types*)" << endl;
|
||||
// boost::property_tree::ptree typeNodes;
|
||||
// for (const auto& type : types) {
|
||||
// typeNodes.push_back(std::make_pair("", toPropertyTree(type)));
|
||||
// }
|
||||
// return typeNodes;
|
||||
// }
|
||||
|
||||
/**
|
||||
* Modified from core_rpc_server.cpp to return a string.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user