Set tokenid in right place

This commit is contained in:
jl777
2019-02-10 09:51:18 -11:00
parent f5f11ea56d
commit 88eb8db62e

View File

@@ -697,12 +697,12 @@ UniValue rogue_register(uint64_t txfee,struct CCcontract_info *cp,cJSON *params)
CScript opretRegister = rogue_registeropret(gametxid, playertxid);
if ( playertxid != zeroid )
{
tokenid = playertxid;
if ( GetTransaction(playertxid,playertx,hashBlock,false) != 0 )
{
if ( DecodeTokenOpRet(playertx.vout.back().scriptPubKey, e, tokenid, voutPubkeys, vopretFinish, vopret2) != 0)
{ // if token in the opret
didtx = 1;
tokenid = playertxid;
rawtx = FinalizeCCTx(0, cp, mtx, mypk, txfee,
EncodeTokenOpRet(tokenid, voutPubkeysEmpty /*=never spent*/, vopretFinish /*=non-fungible*/, opretRegister));
}