defined and wip toModel(ptree&, MoneroTxRequest& req)

This commit is contained in:
woodser
2019-06-05 00:57:28 -04:00
parent 59543576a7
commit 975278f7cf
2 changed files with 15 additions and 0 deletions
+13
View File
@@ -104,6 +104,19 @@ boost::property_tree::ptree MoneroUtils::toPropertyTree(const MoneroSubaddress&
return subaddressNode;
}
void MoneroUtils::toModel(const boost::property_tree::ptree& node, MoneroTxWallet& tx) {
cout << "toModel(txWallet)" << endl;
for (boost::property_tree::ptree::const_iterator it = node.begin(); it != node.end(); ++it) {
string key = it->first;
if (key == string("height")) {
cout << "Setting height!" << endl;
MoneroBlock block;
block.height = std::shared_ptr<uint64_t>(std::make_shared<uint64_t>((uint64_t) 7));
tx.block = std::shared_ptr<MoneroBlock>(std::make_shared<MoneroBlock>(block));
}
}
}
string MoneroUtils::serialize(const MoneroAccount& account) {
cout << "serialize(account)" << endl;
+2
View File
@@ -48,6 +48,8 @@ namespace MoneroUtils
boost::property_tree::ptree toPropertyTree(const MoneroSubaddress& subaddress);
void toModel(const boost::property_tree::ptree& node, MoneroTxWallet& tx);
template <class T> boost::property_tree::ptree toPropertyTree(const vector<T> types) {
cout << "toPropertyTree(types)" << endl;
boost::property_tree::ptree typeNodes;