This commit is contained in:
jl777
2018-08-02 00:39:38 -11:00
parent c51da953ad
commit b5af694313
3 changed files with 8 additions and 2 deletions

View File

@@ -221,7 +221,6 @@ uint64_t AddNormalinputs(CMutableTransaction &mtx,CPubKey mypk,uint64_t total,in
if ( j != mtx.vin.size() )
continue;
if ( myGettxout(txid,vout) == out.tx->vout[out.i].nValue )
//if ( GetTransaction(txid,tx,hashBlock,false) != 0 && tx.IsCoinBase() == 0 )
{
mtx.vin.push_back(CTxIn(txid,vout,CScript()));
nValue = out.tx->vout[out.i].nValue;

View File

@@ -119,6 +119,13 @@ void *dicefinish(void *_ptr)
if ( duplicate == 0 )
{
CTransaction tx,bettx; uint256 txid,hashBlock; char str[65]; int32_t result;
for (i=0; i<10; i++)
{
if ( myGettxout(ptr->bettxid,0) != 0 )
break;
fprintf(stderr,".");
sleep(3);
}
res = DiceWinLoseTimeout(&result,0,name,ptr->fundingtxid,ptr->bettxid,ptr->iswin);
if ( result != 0 && res.empty() == 0 && res.size() > 64 && is_hexstr((char *)res.c_str(),0) > 64 )
{

View File

@@ -1606,7 +1606,7 @@ bool GetAddressUnspent(uint160 addressHash, int type,
uint64_t myGettxout(uint256 hash,int32_t n)
{
CCoins coins;
//LOCK2(cs_main,mempool.cs);
LOCK2(cs_main,mempool.cs);
CCoinsViewMemPool view(pcoinsTip, mempool);
if (!view.GetCoins(hash, coins))
return(0);