Gatewaysmarkdone
This commit is contained in:
@@ -26,6 +26,7 @@ std::string GatewaysDeposit(uint64_t txfee,uint256 bindtxid,int32_t height,std::
|
||||
std::string GatewaysClaim(uint64_t txfee,uint256 bindtxid,std::string refcoin,uint256 deposittxid,CPubKey destpub,int64_t amount);
|
||||
std::string GatewaysWithdraw(uint64_t txfee,uint256 bindtxid,std::string refcoin,std::vector<uint8_t> withdrawpub,int64_t amount);
|
||||
UniValue GatewaysPendingWithdraws(uint256 bindtxid,std::string refcoin);
|
||||
std::string GatewaysMarkdone(uint64_t txfee,uint256 withdrawtxid);
|
||||
|
||||
// CCcustom
|
||||
UniValue GatewaysInfo(uint256 bindtxid);
|
||||
|
||||
@@ -632,7 +632,7 @@ void update_gatewayspending(char *acname,char *oraclestxidstr,char *coin)
|
||||
if ( bits256_nonz(withtxid) != 0 )
|
||||
{
|
||||
fprintf(stderr,"withdraw %s %s %s %.8f processed\n",coin,bits256_str(str,withtxid),withdrawaddr,(double)satoshis/SATOSHIDEN);
|
||||
gatewaystxid2(acname,origtxid);
|
||||
gatewaysmarkdone(acname,origtxid);
|
||||
processed++;
|
||||
}
|
||||
else
|
||||
@@ -644,7 +644,7 @@ void update_gatewayspending(char *acname,char *oraclestxidstr,char *coin)
|
||||
else if ( retval > 0 )
|
||||
{
|
||||
fprintf(stderr,"already did withdraw %s %s %.8f processed\n",coin,withdrawaddr,(double)satoshis/SATOSHIDEN);
|
||||
gatewaystxid2(acname,origtxid);
|
||||
gatewaysmarkdone(acname,origtxid);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -762,6 +762,17 @@ std::string GatewaysWithdraw(uint64_t txfee,uint256 bindtxid,std::string refcoin
|
||||
return("");
|
||||
}
|
||||
|
||||
std::string GatewaysMarkdone(uint64_t txfee,uint256 withdrawtxid)
|
||||
{
|
||||
CMutableTransaction mtx; CScript opret;
|
||||
cp = CCinit(&C,EVAL_GATEWAYS);
|
||||
if ( txfee == 0 )
|
||||
txfee = 10000;
|
||||
mypk = pubkey2pk(Mypubkey());
|
||||
mtx.vin.push_back(CTxIn(withdrawtxid,2,CScript()));
|
||||
return(FinalizeCCTx(0,cp,mtx,mypk,txfee,opret));
|
||||
}
|
||||
|
||||
UniValue GatewaysPendingWithdraws(uint256 bindtxid,std::string refcoin)
|
||||
{
|
||||
UniValue result(UniValue::VOBJ),pending(UniValue::VARR),obj(UniValue::VOBJ); CTransaction tx; std::string coin; CPubKey mypk,gatewayspk; std::vector<CPubKey> msigpubkeys; uint256 hashBlock,assetid,txid,oracletxid; uint8_t M,N,taddr,prefix,prefix2; char depositaddr[64],withmarker[64],coinaddr[64],destaddr[64],str[65],withaddr[64],numstr[32],txidaddr[64],signeraddr[64]; int32_t i,n,numvouts,vout,numqueued,queueflag; int64_t totalsupply; struct CCcontract_info *cp,C;
|
||||
|
||||
Reference in New Issue
Block a user