Keystrokesstr

This commit is contained in:
jl777
2019-02-17 09:28:54 -11:00
parent 82c311feb6
commit 5391c8ca87

View File

@@ -123,6 +123,7 @@ std::string Rogue_pname = "";
// add some more conditions to multiplayer
// change rogue_extract to subfunction without JSON to be used by other functions
// how does it work with playertxid instead of pubkey
// keystrokes retry
//////////////////////// start of CClib interface
//./komodod -ac_name=ROGUE -ac_supply=1000000 -pubkey=03951a6f7967ad784453116bc55cd30c54f91ea8a5b1e9b04d6b29cfd6b395ba6c -addnode=5.9.102.210 -ac_cclib=rogue -ac_perc=10000000 -ac_reward=100000000 -ac_cc=60001 -ac_script=2ea22c80203d1579313abe7d8ea85f48c65ea66fc512c878c0d0e6f6d54036669de940febf8103120c008203000401cc > /dev/null &
@@ -792,13 +793,14 @@ UniValue rogue_keystrokes(uint64_t txfee,struct CCcontract_info *cp,cJSON *param
if ( (params= cclib_reparse(&n,params)) != 0 && n == 2 && (keystrokestr= jstr(jitem(params,1),0)) != 0 )
{
gametxid = juint256(jitem(params,0));
result.push_back(Pair("gametxid",gametxid.GetHex()));
result.push_back(Pair("keystrokes",keystrokestr));
keystrokes = ParseHex(keystrokestr);
mypk = pubkey2pk(Mypubkey());
roguepk = GetUnspendable(cp,0);
GetCCaddress1of2(cp,destaddr,roguepk,mypk);
if ( rogue_isvalidgame(cp,gameheight,tx,buyin,maxplayers,gametxid) == 0 )
{
result.push_back(Pair("gametxid",gametxid.GetHex()));
if ( rogue_findbaton(cp,playertxid,0,numkeys,regslot,playerdata,batontxid,batonvout,batonvalue,batonht,gametxid,tx,maxplayers,destaddr,numplayers,symbol,pname) == 0 )
{
result.push_back(Pair("batontxid",batontxid.GetHex()));