Browse Source

Test

metaverse
jl777 5 years ago
parent
commit
71fbf19c47
  1. 6
      src/cc/rogue_rpc.cpp

6
src/cc/rogue_rpc.cpp

@ -1468,7 +1468,7 @@ bool rogue_validate(struct CCcontract_info *cp,int32_t height,Eval *eval,const C
funcid = script[1];
if ( (e= script[0]) == EVAL_TOKENS )
{
tokentx = 1;
tokentx = funcid;
if ( (funcid= rogue_highlanderopretdecode(gametxid,tokenid,regslot,pk,playerdata,symbol,pname,scriptPubKey)) == 0 )
{
if ( (funcid= rogue_registeropretdecode(gametxid,tokenid,playertxid,scriptPubKey)) == 0 )
@ -1544,7 +1544,7 @@ bool rogue_validate(struct CCcontract_info *cp,int32_t height,Eval *eval,const C
static char laststr[512]; char cashstr[512];
if ( rogue_playerdata_validate(&cashout,ptxid,cp,playerdata,gametxid,pk) < 0 )
{
sprintf(cashstr,"tokentx.%d decoded.%d ht.%d gametxid.%s player.%s invalid playerdata[%d]\n",tokentx,decoded,height,gametxid.GetHex().c_str(),ptxid.GetHex().c_str(),(int32_t)playerdata.size());
sprintf(cashstr,"tokentx.(%c) decoded.%d ht.%d gametxid.%s player.%s invalid playerdata[%d]\n",tokentx,decoded,height,gametxid.GetHex().c_str(),ptxid.GetHex().c_str(),(int32_t)playerdata.size());
if ( strcmp(laststr,cashstr) != 0 )
{
strcpy(laststr,cashstr);
@ -1557,7 +1557,7 @@ bool rogue_validate(struct CCcontract_info *cp,int32_t height,Eval *eval,const C
cashout *= 2;
//if ( tokentx == 0 )
{
sprintf(cashstr,"tokentx.%d decoded.%d ht.%d txid.%s %d,%d %.8f vs vout2 %.8f",tokentx,decoded,height,txid.GetHex().c_str(),tokentx,decoded,(double)cashout/COIN,(double)tx.vout[2].nValue/COIN);
sprintf(cashstr,"tokentx.(%c) decoded.%d ht.%d txid.%s %d,%d %.8f vs vout2 %.8f",tokentx,decoded,height,txid.GetHex().c_str(),tokentx,decoded,(double)cashout/COIN,(double)tx.vout[2].nValue/COIN);
if ( strcmp(laststr,cashstr) != 0 )
{
strcpy(laststr,cashstr);

Loading…
Cancel
Save