mirror of
https://github.com/wownero/wownero-cpp.git
synced 2026-10-18 15:51:34 +02:00
compiling with daemon model merge definition
This commit is contained in:
@@ -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 -----------------------------
|
||||
|
||||
|
||||
@@ -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);
|
||||
};
|
||||
|
||||
/**
|
||||
|
||||
@@ -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));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user