Test
This commit is contained in:
@@ -215,7 +215,7 @@ uint8_t rogue_registeropretdecode(uint256 &gametxid,uint256 &tokenid,uint256 &pl
|
|||||||
{
|
{
|
||||||
std::string name, description; std::vector<uint8_t> vorigPubkey;
|
std::string name, description; std::vector<uint8_t> vorigPubkey;
|
||||||
std::vector<uint8_t> vopretNonfungible, vopret, vopretDummy,origpubkey;
|
std::vector<uint8_t> vopretNonfungible, vopret, vopretDummy,origpubkey;
|
||||||
uint8_t e, f,*script,flag = 0; std::vector<CPubKey> voutPubkeys;
|
uint8_t e, f,*script; std::vector<CPubKey> voutPubkeys;
|
||||||
tokenid = zeroid;
|
tokenid = zeroid;
|
||||||
GetOpReturnData(scriptPubKey, vopret);
|
GetOpReturnData(scriptPubKey, vopret);
|
||||||
script = (uint8_t *)vopret.data();
|
script = (uint8_t *)vopret.data();
|
||||||
@@ -226,11 +226,10 @@ uint8_t rogue_registeropretdecode(uint256 &gametxid,uint256 &tokenid,uint256 &pl
|
|||||||
else if ( script[1] != 'R' && (f= DecodeTokenOpRet(scriptPubKey, e, tokenid, voutPubkeys, vopretDummy)) != 0 )
|
else if ( script[1] != 'R' && (f= DecodeTokenOpRet(scriptPubKey, e, tokenid, voutPubkeys, vopretDummy)) != 0 )
|
||||||
{
|
{
|
||||||
fprintf(stderr,"decode opret %c tokenid.%s\n",script[1],tokenid.GetHex().c_str());
|
fprintf(stderr,"decode opret %c tokenid.%s\n",script[1],tokenid.GetHex().c_str());
|
||||||
GetNonfungibleData(tokenid, vopretNonfungible); //load nonfungible data from the 'tokenbase' tx
|
//GetNonfungibleData(tokenid, vopretNonfungible); //load nonfungible data from the 'tokenbase' tx
|
||||||
vopret = vopretNonfungible;
|
vopret = vopretDummy;
|
||||||
flag = 1;
|
|
||||||
}
|
}
|
||||||
if ( vopret.size() > 2 && E_UNMARSHAL(vopret,ss >> e; ss >> f; ss >> gametxid; ss >> playertxid) != 0 && e == EVAL_ROGUE && (flag != 0 || f == 'R') )
|
if ( vopret.size() > 2 && E_UNMARSHAL(vopret,ss >> e; ss >> f; ss >> gametxid; ss >> playertxid) != 0 && e == EVAL_ROGUE && f == 'R' )
|
||||||
{
|
{
|
||||||
return(f);
|
return(f);
|
||||||
}
|
}
|
||||||
@@ -764,7 +763,7 @@ UniValue rogue_register(uint64_t txfee,struct CCcontract_info *cp,cJSON *params)
|
|||||||
CScript opretRegister = rogue_registeropret(gametxid, playertxid);
|
CScript opretRegister = rogue_registeropret(gametxid, playertxid);
|
||||||
if ( playertxid != zeroid )
|
if ( playertxid != zeroid )
|
||||||
{
|
{
|
||||||
//fprintf(stderr,"playertxid.%s\n",playertxid.GetHex().c_str());
|
fprintf(stderr,"gametxid.%s playertxid.%s opR.%d\n",gametxid.GetHex().c_str(),playertxid.GetHex().c_str(),(int32_t)opretRegister.size());
|
||||||
voutPubkeysEmpty.push_back(burnpk);
|
voutPubkeysEmpty.push_back(burnpk);
|
||||||
if ( GetTransaction(playertxid,playertx,hashBlock,false) != 0 )
|
if ( GetTransaction(playertxid,playertx,hashBlock,false) != 0 )
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user