This commit is contained in:
jl777
2018-10-29 07:03:09 -11:00
parent 17919f0887
commit d83a8593b2
2 changed files with 8 additions and 3 deletions

View File

@@ -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"

View File

@@ -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();
}