From 84ea5902c3f6f7b0690e6d9c49f540c1d076bb99 Mon Sep 17 00:00:00 2001 From: jl777 Date: Mon, 12 Nov 2018 07:36:35 -1100 Subject: [PATCH] mempool.cs --- src/cc/dice.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/cc/dice.cpp b/src/cc/dice.cpp index c68a69f73..4a0da3779 100644 --- a/src/cc/dice.cpp +++ b/src/cc/dice.cpp @@ -226,7 +226,7 @@ bool mySenddicetransaction(std::string res,uint256 entropyused,int32_t entropyvo //fprintf(stderr,"%s\n%s\n",res.c_str(),uint256_str(str,tx.GetHash())); if ( funcid == 'R' || (retval= DiceEntropyUsed(oldbetTx,oldbettxid,oldentropyvout,entropyused,bettxid,betTx,entropyvout)) >= 0 ) { - LOCK(cs_main); + LOCK(mempool.cs); if ( myAddtomempool(tx) != 0 ) { RelayTransaction(tx); @@ -298,7 +298,7 @@ int32_t dice_betspent(char *debugstr,uint256 bettxid) return(1); } { - //LOCK(mempool.cs); + LOCK(mempool.cs); if ( myIsutxo_spentinmempool(bettxid,0) != 0 || myIsutxo_spentinmempool(bettxid,1) != 0 ) { fprintf(stderr,"%s bettxid.%s already spent in mempool\n",debugstr,bettxid.GetHex().c_str()); @@ -1650,7 +1650,7 @@ void *dealer0_loop(void *_arg) { if ( DecodeHexTx(tx,res) != 0 ) { - LOCK(cs_main); + LOCK(mempool.cs); if ( myAddtomempool(tx) != 0 ) { fprintf(stderr,"ENTROPY %s: %d of %d, %d\n",tx.GetHash().GetHex().c_str(),i,n,DICE_MINUTXOS - entropytxs);