isDoubleSpend -> isDoubleSpendSeen

This commit is contained in:
woodser
2019-07-25 13:13:21 -04:00
parent 64d68d7cf1
commit 8ff65912c2
4 changed files with 12 additions and 12 deletions
+2 -2
View File
@@ -194,7 +194,7 @@ namespace monero {
if (unlockTime != boost::none) node.put("unlockTime", *unlockTime);
if (lastRelayedTimestamp != boost::none) node.put("lastRelayedTimestamp", *lastRelayedTimestamp);
if (receivedTimestamp != boost::none) node.put("receivedTimestamp", *receivedTimestamp);
if (isDoubleSpend != boost::none) node.put("isDoubleSpend", *isDoubleSpend);
if (isDoubleSpendSeen != boost::none) node.put("isDoubleSpendSeen", *isDoubleSpendSeen);
if (key != boost::none) node.put("key", *key);
if (fullHex != boost::none) node.put("fullHex", *fullHex);
if (prunedHex != boost::none) node.put("prunedHex", *prunedHex);
@@ -254,7 +254,7 @@ namespace monero {
isConfirmed = MoneroUtils::reconcile(isConfirmed, other->isConfirmed);
doNotRelay = MoneroUtils::reconcile(doNotRelay, other->doNotRelay);
isRelayed = MoneroUtils::reconcile(isRelayed, other->isRelayed);
isDoubleSpend = MoneroUtils::reconcile(isDoubleSpend, other->isDoubleSpend);
isDoubleSpendSeen = MoneroUtils::reconcile(isDoubleSpendSeen, other->isDoubleSpendSeen);
key = MoneroUtils::reconcile(key, other->key);
fullHex = MoneroUtils::reconcile(fullHex, other->fullHex);
prunedHex = MoneroUtils::reconcile(prunedHex, other->prunedHex);
+1 -1
View File
@@ -171,7 +171,7 @@ namespace monero {
boost::optional<uint64_t> unlockTime;
boost::optional<uint64_t> lastRelayedTimestamp;
boost::optional<uint64_t> receivedTimestamp;
boost::optional<bool> isDoubleSpend;
boost::optional<bool> isDoubleSpendSeen;
boost::optional<string> key;
boost::optional<string> fullHex;
boost::optional<string> prunedHex;
+1 -1
View File
@@ -194,7 +194,7 @@ void nodeToTx(const boost::property_tree::ptree& node, shared_ptr<MoneroTx> tx)
else if (key == string("unlockTime")) throw runtime_error("unlockTime deserialization not implemented");
else if (key == string("lastRelayedTimestamp")) throw runtime_error("lastRelayedTimestamp deserialization not implemented");
else if (key == string("receivedTimestamp")) throw runtime_error("receivedTimestamp deserializationn not implemented");
else if (key == string("isDoubleSpend")) tx->isDoubleSpend = stringToBool(it->second.data());
else if (key == string("isDoubleSpendSeen")) tx->isDoubleSpendSeen = stringToBool(it->second.data());
else if (key == string("key")) tx->key = it->second.data();
else if (key == string("fullHex")) tx->fullHex = it->second.data();
else if (key == string("prunedHex")) tx->prunedHex = it->second.data();
+8 -8
View File
@@ -112,7 +112,7 @@ namespace monero {
tx->isRelayed = true;
tx->inTxPool = false;
tx->doNotRelay = false;
tx->isDoubleSpend = false;
tx->isDoubleSpendSeen = false;
// compute numConfirmations TODO monero core: this logic is based on wallet_rpc_server.cpp:87 but it should be encapsulated in wallet2
// TODO: factor out this duplicate code with buildTxWithOutgoingTransfer()
@@ -164,7 +164,7 @@ namespace monero {
tx->isRelayed = true;
tx->inTxPool = false;
tx->doNotRelay = false;
tx->isDoubleSpend = false;
tx->isDoubleSpendSeen = false;
// compute numConfirmations TODO monero core: this logic is based on wallet_rpc_server.cpp:87 but it should be encapsulated in wallet2
if (*block->height >= height || (*block->height == 0 && !*tx->inTxPool)) tx->numConfirmations = 0;
@@ -231,7 +231,7 @@ namespace monero {
tx->isRelayed = true;
tx->inTxPool = true;
tx->doNotRelay = false;
tx->isDoubleSpend = ppd.m_double_spend_seen;
tx->isDoubleSpendSeen = ppd.m_double_spend_seen;
tx->numConfirmations = 0;
// construct transfer
@@ -271,7 +271,7 @@ namespace monero {
tx->isRelayed = !tx->isFailed.get();
tx->inTxPool = !tx->isFailed.get();
tx->doNotRelay = false;
if (!tx->isFailed.get() && tx->isRelayed.get()) tx->isDoubleSpend = false; // TODO: test and handle if true
if (!tx->isFailed.get() && tx->isRelayed.get()) tx->isDoubleSpendSeen = false; // TODO: test and handle if true
tx->numConfirmations = 0;
// construct transfer
@@ -330,7 +330,7 @@ namespace monero {
tx->isRelayed = true;
tx->inTxPool = false;
tx->doNotRelay = false;
tx->isDoubleSpend = false;
tx->isDoubleSpendSeen = false;
// construct vout
shared_ptr<MoneroOutputWallet> vout = shared_ptr<MoneroOutputWallet>(new MoneroOutputWallet());
@@ -1688,7 +1688,7 @@ namespace monero {
tx->doNotRelay = request.doNotRelay != boost::none && request.doNotRelay.get() == true;
tx->isRelayed = tx->doNotRelay.get() != true;
tx->inTxPool = !tx->doNotRelay.get();
if (!tx->isFailed.get() && tx->isRelayed.get()) tx->isDoubleSpend = false; // TODO: test and handle if true
if (!tx->isFailed.get() && tx->isRelayed.get()) tx->isDoubleSpendSeen = false; // TODO: test and handle if true
tx->numConfirmations = 0;
tx->mixin = request.mixin;
tx->unlockTime = request.unlockTime == boost::none ? 0 : request.unlockTime.get();
@@ -1798,7 +1798,7 @@ namespace monero {
tx->doNotRelay = request.doNotRelay != boost::none && request.doNotRelay.get() == true;
tx->isRelayed = tx->doNotRelay.get() != true;
tx->inTxPool = !tx->doNotRelay.get();
if (!tx->isFailed.get() && tx->isRelayed.get()) tx->isDoubleSpend = false; // TODO: test and handle if true
if (!tx->isFailed.get() && tx->isRelayed.get()) tx->isDoubleSpendSeen = false; // TODO: test and handle if true
tx->numConfirmations = 0;
tx->mixin = request.mixin;
tx->unlockTime = request.unlockTime == boost::none ? 0 : request.unlockTime.get();
@@ -1876,7 +1876,7 @@ namespace monero {
tx->doNotRelay = doNotRelay;
tx->isRelayed = tx->doNotRelay.get() != true;
tx->inTxPool = !tx->doNotRelay.get();
if (!tx->isFailed.get() && tx->isRelayed.get()) tx->isDoubleSpend = false; // TODO: test and handle if true
if (!tx->isFailed.get() && tx->isRelayed.get()) tx->isDoubleSpendSeen = false; // TODO: test and handle if true
tx->numConfirmations = 0;
//tx->mixin = request.mixin; // TODO: how to get?
tx->unlockTime = 0;