* PS: should check for prevout to match inputs

* fix CDarkSendEntry constructor
This commit is contained in:
UdjinM6 2016-10-23 19:27:23 +04:00 committed by GitHub
parent ed0a0d2393
commit 565fa31850
2 changed files with 3 additions and 3 deletions

View File

@ -881,7 +881,7 @@ bool CDarksendPool::IsInputScriptSigValid(const CTxIn& txin)
BOOST_FOREACH(const CTxDSIn& txdsin, entry.vecTxDSIn) {
txNew.vin.push_back(txdsin);
if(txdsin == txin) {
if(txdsin.prevout == txin.prevout) {
nTxInIndex = i;
sigPubKey = txdsin.prevPubKey;
}
@ -995,7 +995,7 @@ bool CDarksendPool::AddEntry(const CDarkSendEntry& entryNew, PoolMessage& nMessa
LogPrint("privatesend", "looking for txin -- %s\n", txin.ToString());
BOOST_FOREACH(const CDarkSendEntry& entry, vecEntries) {
BOOST_FOREACH(const CTxDSIn& txdsin, entry.vecTxDSIn) {
if((CTxIn)txdsin == txin) {
if(txdsin.prevout == txin.prevout) {
LogPrint("privatesend", "CDarksendPool::AddEntry -- found in txin\n");
nMessageIDRet = ERR_ALREADY_HAVE;
nSessionUsers--;

View File

@ -103,7 +103,7 @@ public:
vecTxDSOut(std::vector<CTxDSOut>()),
txCollateral(CTransaction()),
nAmount(0),
nTimeAdded(0)
nTimeAdded(GetTime())
{}
CDarkSendEntry(const std::vector<CTxIn>& vecTxIn, const std::vector<CTxOut>& vecTxOut, const CTransaction& txCollateral) :