This commit is contained in:
jl777
2019-03-01 01:47:09 -11:00
parent 50acda6640
commit 1f8591b0e9
4 changed files with 33 additions and 9 deletions

View File

@@ -593,16 +593,19 @@ int32_t rogue_playersalive(int32_t &openslots,int32_t &numplayers,uint256 gametx
numplayers = openslots = 0;
if ( komodo_nextheight() <= gameht+ROGUE_MAXKEYSTROKESGAP )
registration_open = 1;
fprintf(stderr,"players alive\n");
for (i=0; i<maxplayers; i++)
{
fprintf(stderr,"players alive %d\n",i);
if ( CCgettxout(gametxid,1+i,1,0) < 0 )
{
numplayers++;
fprintf(stderr,"players alive %d spent baton\n",i);
if ( CCgettxout(gametxid,1+maxplayers+i,1,0) == txfee )
{
txid = gametxid;
vout = 1+i;
//fprintf(stderr,"scan forward active.%s spenttxid.%s\n",gametxid.GetHex().c_str(),txid.GetHex().c_str());
fprintf(stderr,"rogue_playersalive scan forward active.%s spenttxid.%s\n",gametxid.GetHex().c_str(),txid.GetHex().c_str());
n = 0;
while ( CCgettxout(txid,vout,1,0) < 0 )
{
@@ -617,14 +620,16 @@ int32_t rogue_playersalive(int32_t &openslots,int32_t &numplayers,uint256 gametx
}
txid = spenttxid;
vout = 0;
//fprintf(stderr,"n.%d next txid.%s/v%d\n",n,txid.GetHex().c_str(),spentvini);
fprintf(stderr,"n.%d next txid.%s/v%d\n",n,txid.GetHex().c_str(),spentvini);
if ( spentvini != 0 )
break;
if ( n++ > ROGUE_MAXITERATIONS )
break;
}
fprintf(stderr,"out of while\n");
if ( txid != zeroid )
{
fprintf(stderr,"get height of %s\n",txid.GetHex().c_str());
if ( myGetTransaction(txid,tx,hashBlock) != 0 && (pindex= komodo_blockindex(hashBlock)) != 0 )
{
if ( pindex->GetHeight() <= gameht+ROGUE_MAXKEYSTROKESGAP )