Test
This commit is contained in:
@@ -427,7 +427,7 @@ int32_t rogue_playerdata(struct CCcontract_info *cp,uint256 &origplayergame,CPub
|
|||||||
memcpy(&gametxid,script+2,sizeof(gametxid));
|
memcpy(&gametxid,script+2,sizeof(gametxid));
|
||||||
if ( rogue_isvalidgame(cp,gameheight,gametx,buyin,maxplayers,gametxid) == 0 )
|
if ( rogue_isvalidgame(cp,gameheight,gametx,buyin,maxplayers,gametxid) == 0 )
|
||||||
{
|
{
|
||||||
fprintf(stderr,"playertxid.%s got vin.%s/v%d gametxid.%s iterate.%d\n",playertxid.ToString().c_str(),playertx.vin[1].prevout.hash.ToString().c_str(),(int32_t)playertx.vin[1].prevout.n-maxplayers,gametxid.ToString().c_str(),rogue_iterateplayer(gametxid,playertx.vin[1].prevout.n-maxplayers,playertxid));
|
fprintf(stderr,"playertxid.%s got vin.%s/v%d gametxid.%s iterate.%d\n",playertxid.ToString().c_str(),playertx.vin[1].prevout.hash.ToString().c_str(),(int32_t)playertx.vin[1].prevout.n-maxplayers,gametxid.ToString().c_str(),rogue_iterateplayer(registertxid,gametxid,playertx.vin[1].prevout.n-maxplayers,playertxid));
|
||||||
if ( playertx.vin[1].prevout.hash == gametxid && rogue_iterateplayer(registertxid,gametxid,playertx.vin[1].prevout.n-maxplayers,playertxid) == 0 )
|
if ( playertx.vin[1].prevout.hash == gametxid && rogue_iterateplayer(registertxid,gametxid,playertx.vin[1].prevout.n-maxplayers,playertxid) == 0 )
|
||||||
{
|
{
|
||||||
if ( (f= rogue_highlanderopretdecode(origplayergame,pk,playerdata,playertx.vout[numvouts-1].scriptPubKey)) == 'H' || f == 'Q' || f == 'S' )
|
if ( (f= rogue_highlanderopretdecode(origplayergame,pk,playerdata,playertx.vout[numvouts-1].scriptPubKey)) == 'H' || f == 'Q' || f == 'S' )
|
||||||
@@ -704,7 +704,7 @@ UniValue rogue_register(uint64_t txfee,struct CCcontract_info *cp,cJSON *params)
|
|||||||
else if ( buyin > 0 && AddNormalinputs(mtx,mypk,buyin,64) < buyin )
|
else if ( buyin > 0 && AddNormalinputs(mtx,mypk,buyin,64) < buyin )
|
||||||
return(cclib_error(result,"couldnt find enough normal funds for buyin"));
|
return(cclib_error(result,"couldnt find enough normal funds for buyin"));
|
||||||
if ( playertxid != zeroid )
|
if ( playertxid != zeroid )
|
||||||
AddNormalInputs2(mtx,txfee,10);
|
AddNormalinputs2(mtx,txfee,10);
|
||||||
mtx.vout.push_back(MakeCC1of2vout(cp->evalcode,buyin + inputsum - txfee,roguepk,mypk));
|
mtx.vout.push_back(MakeCC1of2vout(cp->evalcode,buyin + inputsum - txfee,roguepk,mypk));
|
||||||
GetCCaddress1of2(cp,destaddr,roguepk,roguepk);
|
GetCCaddress1of2(cp,destaddr,roguepk,roguepk);
|
||||||
CCaddr1of2set(cp,roguepk,roguepk,cp->CCpriv,destaddr);
|
CCaddr1of2set(cp,roguepk,roguepk,cp->CCpriv,destaddr);
|
||||||
|
|||||||
Reference in New Issue
Block a user