diff --git a/src/cc/dapps/oraclefeed.c b/src/cc/dapps/oraclefeed.c index e85206071..98b5664d6 100644 --- a/src/cc/dapps/oraclefeed.c +++ b/src/cc/dapps/oraclefeed.c @@ -869,11 +869,11 @@ void update_gatewayspending(char *refcoin,char *acname,char *bindtxidstr,int32_t } else fprintf(stderr,"couldnt create msig rawtx\n"); } } - else if ( retval > 0 ) - { - fprintf(stderr,"already did withdraw %s %s %.8f processed\n",refcoin,withdrawaddr,(double)satoshis/SATOSHIDEN); - gatewaysmarkdone("KMD",acname,origtxid,refcoin,zeroid); - } + // else if ( retval > 0 ) + // { + // fprintf(stderr,"already did withdraw %s %s %.8f processed\n",refcoin,withdrawaddr,(double)satoshis/SATOSHIDEN); + // gatewaysmarkdone("KMD",acname,origtxid,refcoin,zeroid); + // } } } } diff --git a/src/cc/gateways.cpp b/src/cc/gateways.cpp index 6d1bff5c9..cd892e131 100644 --- a/src/cc/gateways.cpp +++ b/src/cc/gateways.cpp @@ -801,7 +801,7 @@ std::string GatewaysWithdraw(uint64_t txfee,uint256 bindtxid,std::string refcoin CCchange = (inputs - amount); mtx.vout.push_back(MakeCC1vout(EVAL_GATEWAYS,amount,gatewayspk)); mtx.vout.push_back(CTxOut(txfee,CScript() << withdrawpub << OP_CHECKSIG)); - mtx.vout.push_back(CTxOut(txfee,CScript() << ParseHex(HexStr(gatewayspk)) << OP_CHECKSIG)); + mtx.vout.push_back(MakeCC1vout(EVAL_GATEWAYS,txfee,gatewayspk)); if ( CCchange != 0 ) mtx.vout.push_back(MakeCC1vout(EVAL_GATEWAYS,CCchange,mypk)); return(FinalizeCCTx(0,cp,mtx,mypk,txfee,EncodeAssetOpRet('t',assetid,zeroid,0,Mypubkey()))); @@ -818,6 +818,7 @@ std::string GatewaysMarkdone(uint64_t txfee,uint256 withdrawtxid,std::string ref if ( txfee == 0 ) txfee = 5000; mypk = pubkey2pk(Mypubkey()); + mtx.vin.push_back(CTxIn(withdrawtxid,2,CScript())); mtx.vout.push_back(CTxOut(5000,CScript() << ParseHex(HexStr(mypk)) << OP_CHECKSIG)); opret << OP_RETURN << E_MARSHAL(ss << cp->evalcode << 'M' << cointxid << refcoin);