Auto entropy on dealer dice status
This commit is contained in:
@@ -815,22 +815,19 @@ int64_t DicePlanFunds(uint64_t &entropyval,uint256 &entropytxid,uint64_t refsbit
|
|||||||
//fprintf(stderr,"skip coinbase\n");
|
//fprintf(stderr,"skip coinbase\n");
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
//if ( funcid == 'E' )
|
//if ( fundingtxid != tx.vin[0].prevout.hash && vinTx.vout[tx.vin[0].prevout.n].scriptPubKey != fundingPubKey )
|
||||||
|
if ( fundingtxid != tx.vin[0].prevout.hash && vinTx.vout[1].scriptPubKey != fundingPubKey )
|
||||||
{
|
{
|
||||||
//if ( fundingtxid != tx.vin[0].prevout.hash && vinTx.vout[tx.vin[0].prevout.n].scriptPubKey != fundingPubKey )
|
uint8_t *ptr0,*ptr1; int32_t i; char str[65];
|
||||||
if ( fundingtxid != tx.vin[0].prevout.hash && vinTx.vout[1].scriptPubKey != fundingPubKey )
|
ptr0 = (uint8_t *)vinTx.vout[1].scriptPubKey.data();
|
||||||
{
|
ptr1 = (uint8_t *)fundingPubKey.data();
|
||||||
uint8_t *ptr0,*ptr1; int32_t i; char str[65];
|
for (i=0; i<vinTx.vout[1].scriptPubKey.size(); i++)
|
||||||
ptr0 = (uint8_t *)vinTx.vout[1].scriptPubKey.data();
|
fprintf(stderr,"%02x",ptr0[i]);
|
||||||
ptr1 = (uint8_t *)fundingPubKey.data();
|
fprintf(stderr," script vs ");
|
||||||
for (i=0; i<vinTx.vout[1].scriptPubKey.size(); i++)
|
for (i=0; i<fundingPubKey.size(); i++)
|
||||||
fprintf(stderr,"%02x",ptr0[i]);
|
fprintf(stderr,"%02x",ptr1[i]);
|
||||||
fprintf(stderr," script vs ");
|
fprintf(stderr," (%c) entropy vin.%d fundingPubKey mismatch %s\n",funcid,1,uint256_str(str,tx.vin[0].prevout.hash));
|
||||||
for (i=0; i<fundingPubKey.size(); i++)
|
continue;
|
||||||
fprintf(stderr,"%02x",ptr1[i]);
|
|
||||||
fprintf(stderr," (%c) entropy vin.%d fundingPubKey mismatch %s\n",funcid,1,uint256_str(str,tx.vin[0].prevout.hash));
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
entropytxid = txid;
|
entropytxid = txid;
|
||||||
entropyval = tx.vout[0].nValue;
|
entropyval = tx.vout[0].nValue;
|
||||||
@@ -1333,15 +1330,30 @@ double DiceStatus(uint64_t txfee,char *planstr,uint256 fundingtxid,uint256 bettx
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
/*if ( 0 && scriptPubKey == fundingPubKey )
|
if ( scriptPubKey == fundingPubKey )
|
||||||
{
|
{
|
||||||
for (i=0; i<=n; i++)
|
CTransaction tx; uint64_t entropyval; uint256 entropytxid; int32_t entropytxs,mintxs=5000;
|
||||||
|
DicePlanFunds(entropyval,entropytxid,sbits,cp,dicepk,fundingtxid,entropytxs,false);
|
||||||
|
if ( entropytxs < mintxs )
|
||||||
{
|
{
|
||||||
res = DiceAddfunding(txfee,planstr,fundingtxid,COIN);
|
for (i=0; i<mintxs - entropytxs; i++)
|
||||||
fprintf(stderr,"ENTROPY tx:\n");
|
{
|
||||||
mySenddicetransaction(res,entropyused,bettxid);
|
res = DiceAddfunding(txfee,planstr,fundingtxid,COIN/100);
|
||||||
|
if ( res.empty() == 0 && res.size() > 64 && is_hexstr((char *)res.c_str(),0) > 64 )
|
||||||
|
{
|
||||||
|
if ( DecodeHexTx(tx,res) != 0 )
|
||||||
|
{
|
||||||
|
//LOCK(cs_main);
|
||||||
|
if ( myAddtomempool(tx) != 0 )
|
||||||
|
{
|
||||||
|
fprintf(stderr,"ENTROPY %s: %d of %d\n",tx.GetHash().GetHex().c_str(),i,mintxs - entropytxs);
|
||||||
|
RelayTransaction(tx);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}*/
|
}
|
||||||
return(n);
|
return(n);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|||||||
Reference in New Issue
Block a user