From 1e800bed0910cab6ef0eaca22df445fa5084bb60 Mon Sep 17 00:00:00 2001 From: jl777 Date: Tue, 6 Nov 2018 02:29:49 -1100 Subject: [PATCH] Fix --- src/cc/dice.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/cc/dice.cpp b/src/cc/dice.cpp index e864612f1..12143acc2 100644 --- a/src/cc/dice.cpp +++ b/src/cc/dice.cpp @@ -128,10 +128,10 @@ bool mySenddicetransaction(std::string res,uint256 entropyused,uint256 bettxid) if ( DecodeHexTx(tx,res) != 0 ) { //fprintf(stderr,"%s\n%s\n",res.c_str(),uint256_str(str,tx.GetHash())); - LOCK(cs_main); - if ( myAddtomempool(tx) != 0 ) + if ( DiceEntropyUsed(entropyused,bettxid) == 0 ) { - if ( DiceEntropyUsed(entropyused,bettxid) == 0 ) + LOCK(cs_main); + if ( myAddtomempool(tx) != 0 ) { RelayTransaction(tx); for (i=0; i txid.%s\n",i,entropyused.GetHex().c_str(),bettxid.GetHex().c_str(),tx.GetHash().GetHex().c_str()); + return(true); } - return(true); } else fprintf(stderr,"error adding to mempool\n"); } else fprintf(stderr,"error decoding hex\n"); }