From b5af6943130704bae2ae4c3ab78d615d3fb5148d Mon Sep 17 00:00:00 2001 From: jl777 Date: Thu, 2 Aug 2018 00:39:38 -1100 Subject: [PATCH] Test --- src/cc/CCtx.cpp | 1 - src/cc/dice.cpp | 7 +++++++ src/main.cpp | 2 +- 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/src/cc/CCtx.cpp b/src/cc/CCtx.cpp index 5863197c5..dbb477817 100644 --- a/src/cc/CCtx.cpp +++ b/src/cc/CCtx.cpp @@ -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; diff --git a/src/cc/dice.cpp b/src/cc/dice.cpp index a06c16064..b7e0dd14a 100644 --- a/src/cc/dice.cpp +++ b/src/cc/dice.cpp @@ -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 ) { diff --git a/src/main.cpp b/src/main.cpp index 312cc8782..274d86c07 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -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); -- 2.42.0