MoneroTxRequest::meetsCriteria() implementation

This commit is contained in:
woodser
2019-06-20 10:22:37 -04:00
parent cbc093c6a8
commit 7590b77ec6
4 changed files with 72 additions and 6 deletions
+7
View File
@@ -6,6 +6,8 @@
/**
* Public library interface.
*
* TODO: separate per model class like wallet (cleanup)
*/
namespace monero {
@@ -161,6 +163,11 @@ namespace monero {
//txIds = MoneroUtils::reconcile(txIds, otherBlock->txIds); // TODO: implement
}
boost::optional<uint64_t> MoneroTx::getHeight() const {
if (block == boost::none) return boost::none;
return *((*block)->height);
}
void MoneroTx::merge(const shared_ptr<MoneroTx>& self, const shared_ptr<MoneroTx>& other) {
if (this != self.get()) throw runtime_error("this != self");
if (self == other) return;