model structs compiling using pointers and forward declarations

This commit is contained in:
woodser
2019-06-03 10:49:08 -04:00
parent 8f903bdbc6
commit 3f498c56fa
2 changed files with 4 additions and 5 deletions
+2 -3
View File
@@ -30,7 +30,6 @@ namespace monero {
// forward declarations
struct MoneroTx;
struct MoneroBlock;
/**
* Models a Monero block header which contains information about the block.
@@ -60,7 +59,7 @@ namespace monero {
*/
struct MoneroBlock : public MoneroBlockHeader {
string hex;
MoneroTx coinbaseTx;
MoneroTx* coinbaseTx;
vector<MoneroTx> txs;
vector<string> txIds;
};
@@ -78,7 +77,7 @@ namespace monero {
*/
struct MoneroOutput {
MoneroTx* tx;
MoneroKeyImage keyImage;
MoneroKeyImage* keyImage;
uint64_t amount;
uint32_t index;
vector<uint32_t> ringOutputIndices;
+2 -2
View File
@@ -91,7 +91,7 @@ namespace monero {
* Models a base transfer of funds to or from the wallet.
*/
struct MoneroTransfer {
MoneroTxWallet tx;
MoneroTxWallet* tx;
uint64_t amount;
uint32_t accountIndex;
bool isIncoming;
@@ -119,7 +119,7 @@ namespace monero {
*/
struct MoneroTxWallet : public MoneroTx {
vector<MoneroIncomingTransfer> incomingTransfers;
MoneroOutgoingTransfer outgoingTransfer;
MoneroOutgoingTransfer* outgoingTransfer;
uint32_t numSuggestedConfirmations;
string note;
};