mirror of
https://github.com/wownero/wownero-cpp.git
synced 2026-10-21 17:18:44 +02:00
defined and wip toModel(ptree&, MoneroTxRequest& req)
This commit is contained in:
@@ -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;
|
||||
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user