Add normal input to use playerdata

This commit is contained in:
jl777
2019-02-10 00:28:01 -11:00
parent 2e9f18d3dc
commit 666935b936

View File

@@ -697,6 +697,8 @@ UniValue rogue_register(uint64_t txfee,struct CCcontract_info *cp,cJSON *params)
return(cclib_error(result,"couldnt find playerdata to spend"));
else if ( buyin > 0 && AddNormalinputs(mtx,mypk,buyin,64) < buyin )
return(cclib_error(result,"couldnt find enough normal funds for buyin"));
if ( playertxid != zeroid )
AddNormalInputs2(mtx,txfee,10);
mtx.vout.push_back(MakeCC1of2vout(cp->evalcode,buyin + inputsum - txfee,roguepk,mypk));
GetCCaddress1of2(cp,destaddr,roguepk,roguepk);
CCaddr1of2set(cp,roguepk,roguepk,cp->CCpriv,destaddr);