This commit is contained in:
jl777
2019-03-21 20:46:03 -11:00
parent fbc2feefa9
commit a1810eb2d3

View File

@@ -240,7 +240,7 @@ UniValue payments_rawtxresult(UniValue &result,std::string rawtx,int32_t broadca
cJSON *payments_reparse(int32_t *nump,char *jsonstr) cJSON *payments_reparse(int32_t *nump,char *jsonstr)
{ {
cJSON *params; char *newstr; int32_t i,j; cJSON *params=0; char *newstr; int32_t i,j;
*nump = 0; *nump = 0;
if ( jsonstr != 0 ) if ( jsonstr != 0 )
{ {
@@ -263,11 +263,11 @@ cJSON *payments_reparse(int32_t *nump,char *jsonstr)
} }
newstr[j] = 0; newstr[j] = 0;
params = cJSON_Parse(newstr); params = cJSON_Parse(newstr);
if ( 0 && params != 0 ) if ( 1 && params != 0 )
printf("new.(%s) -> %s\n",newstr,jprint(params,0)); printf("new.(%s) -> %s\n",newstr,jprint(params,0));
free(newstr); free(newstr);
*nump = cJSON_GetArraySize(params); *nump = cJSON_GetArraySize(params);
} else params = 0; }
return(params); return(params);
} }
@@ -295,6 +295,7 @@ UniValue PaymentsRelease(struct CCcontract_info *cp,char *jsonstr)
int32_t latestheight,nextheight = komodo_nextheight(); int32_t latestheight,nextheight = komodo_nextheight();
CMutableTransaction tmpmtx,mtx = CreateNewContextualCMutableTransaction(Params().GetConsensus(),nextheight); UniValue result(UniValue::VOBJ); uint256 createtxid,hashBlock; CMutableTransaction tmpmtx,mtx = CreateNewContextualCMutableTransaction(Params().GetConsensus(),nextheight); UniValue result(UniValue::VOBJ); uint256 createtxid,hashBlock;
CTransaction tx,txO; CPubKey mypk,txidpk,Paymentspk; int32_t i,n,numoprets=0,lockedblocks,minrelease,totalallocations,checkallocations=0,allocation; int64_t inputsum,amount,CCchange=0; CTxOut vout; CScript onlyopret; char txidaddr[64],destaddr[64]; std::vector<uint256> txidoprets; std::string rawtx; CTransaction tx,txO; CPubKey mypk,txidpk,Paymentspk; int32_t i,n,numoprets=0,lockedblocks,minrelease,totalallocations,checkallocations=0,allocation; int64_t inputsum,amount,CCchange=0; CTxOut vout; CScript onlyopret; char txidaddr[64],destaddr[64]; std::vector<uint256> txidoprets; std::string rawtx;
fprintf(stderr,"jsonstr.(%s)\n",jsonstr);
cJSON *params = payments_reparse(&n,jsonstr); cJSON *params = payments_reparse(&n,jsonstr);
mypk = pubkey2pk(Mypubkey()); mypk = pubkey2pk(Mypubkey());
Paymentspk = GetUnspendable(cp,0); Paymentspk = GetUnspendable(cp,0);