From 7c59f227c5a1025e645687770fd8eb0b2c6ee569 Mon Sep 17 00:00:00 2001 From: jl777 Date: Fri, 30 Nov 2018 13:09:25 -1100 Subject: [PATCH 1/2] Allow bigger auto diceaddfunds --- 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 8d750b1ed..597f2cb38 100644 --- a/src/cc/dice.cpp +++ b/src/cc/dice.cpp @@ -98,7 +98,7 @@ What is needed is for the dealer node to track the entropy tx that was already b #include "../compat/endian.h" #define MAX_ENTROPYUSED 8192 -#define DICE_MINUTXOS 10000 +#define DICE_MINUTXOS 15000 extern int32_t KOMODO_INSYNC; pthread_mutex_t DICE_MUTEX,DICEREVEALED_MUTEX; @@ -1392,7 +1392,7 @@ std::string DiceAddfunding(uint64_t txfee,char *planstr,uint256 fundingtxid,int6 } if ( scriptPubKey == fundingPubKey ) { - if ( AddNormalinputs(mtx,mypk,amount+2*txfee,1) > 0 ) + if ( AddNormalinputs(mtx,mypk,amount+2*txfee,60) > 0 ) { hentropy = DiceHashEntropy(entropy,mtx.vin[0].prevout.hash,mtx.vin[0].prevout.n,1); mtx.vout.push_back(MakeCC1vout(cp->evalcode,amount,dicepk)); @@ -1667,7 +1667,7 @@ void *dealer0_loop(void *_arg) n = sqrt(DICE_MINUTXOS - entropytxs) + 10; for (i=0; i 64 && is_hexstr((char *)res.c_str(),0) > 64 ) { if ( DecodeHexTx(tx,res) != 0 ) From db83c122c7c1cc121c61faeed8b86d8626758cf0 Mon Sep 17 00:00:00 2001 From: jl777 Date: Fri, 30 Nov 2018 13:59:03 -1100 Subject: [PATCH 2/2] Reduce network traffic --- src/main.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main.cpp b/src/main.cpp index 1ca925482..de9fe34c3 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -5202,11 +5202,11 @@ bool ProcessNewBlock(bool from_miner,int32_t height,CValidationState &state, CNo CheckBlockIndex(); if (!ret && futureblock == 0) { - if ( ASSETCHAINS_SYMBOL[0] == 0 ) + /*if ( ASSETCHAINS_SYMBOL[0] == 0 ) { //fprintf(stderr,"request headers from failed process block peer\n"); pfrom->PushMessage("getheaders", chainActive.GetLocator(chainActive.LastTip()), uint256()); - } + }*/ komodo_longestchain(); return error("%s: AcceptBlock FAILED", __func__); }