all struct references are shared_ptrs

This commit is contained in:
woodser
2019-06-10 15:08:48 -04:00
parent 7c99fb2757
commit 9cd50b37af
4 changed files with 214 additions and 36 deletions
+1 -1
View File
@@ -47,7 +47,7 @@ namespace monero {
//cout << "MoneroBlock::toPropertyTree(block)" << endl;
boost::property_tree::ptree node = MoneroBlockHeader::toPropertyTree();
if (hex != boost::none) node.put("hex", *hex);
if (coinbaseTx != boost::none) node.add_child("coinbaseTx", coinbaseTx->toPropertyTree());
if (coinbaseTx != boost::none) node.add_child("coinbaseTx", (*coinbaseTx)->toPropertyTree());
node.add_child("txs", MoneroUtils::toPropertyTree(txs));
// TODO: handle txIds
return node;
+1 -1
View File
@@ -136,7 +136,7 @@ namespace monero {
*/
struct MoneroBlock : public MoneroBlockHeader {
boost::optional<string> hex;
boost::optional<MoneroTx> coinbaseTx;
boost::optional<shared_ptr<MoneroTx>> coinbaseTx;
vector<shared_ptr<MoneroTx>> txs;
vector<string> txIds;