compiling with daemon model merge definition

This commit is contained in:
woodser
2019-06-11 13:18:52 -04:00
parent 3757513f62
commit d43b2d5479
3 changed files with 17 additions and 3 deletions
+11
View File
@@ -98,6 +98,17 @@ namespace monero {
// -------------------------- MODEL IMPLEMENTATION --------------------------
void MoneroBlockHeader::merge(const MoneroBlockHeader& header) {
throw runtime_error("Not implemented");
}
void MoneroBlock::merge(const MoneroBlock& block) {
throw runtime_error("Not implemented");
}
void MoneroTx::merge(const MoneroTx& tx) {
throw runtime_error("Not implemented");
}
// ---------------------------- PRIVATE HELPERS -----------------------------
+3
View File
@@ -82,6 +82,7 @@ namespace monero {
boost::optional<string> powHash;
boost::property_tree::ptree toPropertyTree() const;
void merge(const MoneroBlockHeader& header);
};
/**
@@ -94,6 +95,7 @@ namespace monero {
vector<string> txIds;
boost::property_tree::ptree toPropertyTree() const;
void merge(const MoneroBlock& block);
};
/**
@@ -145,6 +147,7 @@ namespace monero {
if (block == boost::none) return boost::none;
return *((*block)->height);
}
void merge(const MoneroTx& tx);
};
/**
+3 -3
View File
@@ -209,16 +209,16 @@ namespace monero {
(*tx->block)->txs = txs;
(*tx->block)->height = *aTx->getHeight();
}
//aTx->block->merge(tx->block);
(*aTx->block)->merge(**tx->block);
} else {
//aTx->merge(*tx);
aTx->merge(*tx);
}
return;
}
// merge common block of different txs
if (tx->getHeight() != boost::none && *tx->getHeight() == *aTx->getHeight()) {
//(*aTx-block)->merge(*tx->block);
(*aTx->block)->merge(**tx->block);
//if (aTx.getIsConfirmed()) assertTrue(aTx.getBlock().getTxs().contains(aTx));
}
}