If a new transaction is discovered in the consensus process and we have not

relayed it recently, do so. This is not the perfect solution, it would be
better to relay it when we accept the new ledger, relaying only if it fits
in the consensus ledger.
This commit is contained in:
JoelKatz
2012-09-17 00:54:48 -07:00
parent 89518e23cc
commit 92fbff0efc

View File

@@ -832,6 +832,16 @@ void LedgerConsensus::addDisputedTransaction(const uint256& txID, const std::vec
if (cit != mAcquired.end() && cit->second)
txn->setVote(pit.first, cit->second->hasItem(txID));
}
if (!ourVote && theApp->isNew(txID))
{
newcoin::TMTransaction msg;
msg.set_rawtransaction(&(tx.front()), tx.size());
msg.set_status(newcoin::tsNEW);
msg.set_receivetimestamp(theApp->getOPs().getNetworkTimeNC());
PackedMessage::pointer packet = boost::make_shared<PackedMessage>(msg, newcoin::mtTRANSACTION);
theApp->getConnectionPool().relayMessage(NULL, packet);
}
}
bool LedgerConsensus::peerPosition(const LedgerProposal::pointer& newPosition)