From d83a8593b22725cb4cd81f96e4a23b57884e0e64 Mon Sep 17 00:00:00 2001 From: jl777 Date: Mon, 29 Oct 2018 07:03:09 -1100 Subject: [PATCH] -print --- src/cc/dice.cpp | 5 +++++ src/main.cpp | 6 +++--- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/src/cc/dice.cpp b/src/cc/dice.cpp index 7e013ffe2..ee41dca17 100644 --- a/src/cc/dice.cpp +++ b/src/cc/dice.cpp @@ -85,6 +85,11 @@ WARNING: there is an attack vector that precludes betting any large amounts, it 3. reorg the chain and make a big bet using the winning entropy calculated in 2. In order to mitigate this, the disclosure of the house entropy needs to be delayed beyond a reasonable reorg depth (notarization). It is recommended for production dice game with significant amounts of money to use such a delayed disclosure method. + + Actually a much better solution to this is possible, which allows to retain the realtime response aspect of dice CC, which is critical to its usage. + + + */ #include "../compat/endian.h" diff --git a/src/main.cpp b/src/main.cpp index 34492dc9f..ae8f92887 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -4320,10 +4320,10 @@ bool CheckBlock(int32_t *futureblockp,int32_t height,CBlockIndex *pindex,const C CValidationState state; bool fMissingInputs,fOverrideFees = false; if (AcceptToMemoryPool(mempool, state, tx, false, &fMissingInputs, !fOverrideFees,true) == false ) invalidtxs++; - else - fprintf(stderr, "added mempool tx back to mempool\n"); + //else fprintf(stderr, "added mempool tx back to mempool\n"); } - fprintf(stderr, "number of invalid txs: %d\n",invalidtxs ); + if ( invalidtxs > 0 ) + fprintf(stderr, "number of invalid txs: %d\n",invalidtxs ); // empty the temp mempool for next time. tmpmempool.clear(); }