ready to implement relayTxs();

tx->isDoubleSpend depends on isFailed and isRelayed;
This commit is contained in:
woodser
2019-06-30 10:55:47 -04:00
parent 0e7fa54b61
commit a389e19580
+3 -3
View File
@@ -1150,11 +1150,11 @@ namespace monero {
// init other known fields
tx->isConfirmed = false;
tx->isCoinbase = false;
tx->isFailed = false;
tx->isDoubleSpend = false;
tx->isFailed = false; // TODO: test and handle if true
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
tx->numConfirmations = 0;
tx->mixin = request.mixin;
tx->unlockTime = request.unlockTime == boost::none ? 0 : request.unlockTime.get();
@@ -1403,7 +1403,7 @@ namespace monero {
tx->isRelayed = !tx->isFailed.get();
tx->inTxPool = !tx->isFailed.get();
tx->doNotRelay = false;
tx->isDoubleSpend = false; // TODO: test, detect, and set double spend
if (!tx->isFailed.get() && tx->isRelayed.get()) tx->isDoubleSpend = false; // TODO: test and handle if true
tx->numConfirmations = 0;
// construct transfer