mirror of
https://github.com/wownero/wownero-cpp.git
synced 2026-11-19 14:44:15 +01:00
all struct references are shared_ptrs
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user