From 71d9c82c7ab7593281f9010e4bd803065dffaac1 Mon Sep 17 00:00:00 2001 From: Mihailo Milenkovic Date: Mon, 29 Oct 2018 12:46:51 +0100 Subject: [PATCH] Check mempool for markdone in pending --- src/cc/gateways.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/cc/gateways.cpp b/src/cc/gateways.cpp index c3d09098c..b49d51664 100644 --- a/src/cc/gateways.cpp +++ b/src/cc/gateways.cpp @@ -880,8 +880,7 @@ UniValue GatewaysPendingWithdraws(uint256 bindtxid,std::string refcoin) { queueflag = 1; break; - } - //Getscriptaddress(withmarker,CScript() << ParseHex(HexStr(gatewayspk)) << OP_CHECKSIG); + } SetCCunspents(unspentOutputs,coinaddr); numqueued = 0; for (std::vector >::const_iterator it=unspentOutputs.begin(); it!=unspentOutputs.end(); it++) @@ -890,7 +889,8 @@ UniValue GatewaysPendingWithdraws(uint256 bindtxid,std::string refcoin) vout = (int32_t)it->first.index; nValue = (int64_t)it->second.satoshis; fprintf(stderr,"%s %d %ld\n",txid.ToString().c_str(),vout,(long)nValue); - if ( vout == 2 && nValue == 10000 && GetTransaction(txid,tx,hashBlock,false) != 0 && (numvouts= tx.vout.size()) && DecodeGatewaysWithdrawOpRet(tx.vout[numvouts-1].scriptPubKey,assetid,tmprefcoin,withdrawpub,amount) == 'W') + if ( vout == 2 && nValue == 10000 && GetTransaction(txid,tx,hashBlock,false) != 0 && (numvouts= tx.vout.size()) && + DecodeGatewaysWithdrawOpRet(tx.vout[numvouts-1].scriptPubKey,assetid,tmprefcoin,withdrawpub,amount) == 'W' && myIsutxo_spentinmempool(txid,vout) != 0) { Getscriptaddress(destaddr,tx.vout[0].scriptPubKey); Getscriptaddress(withaddr,tx.vout[1].scriptPubKey);