Merge pull request #1007 from jl777/jl777

Jl777
This commit is contained in:
jl777
2018-11-30 13:59:36 -11:00
committed by GitHub
2 changed files with 5 additions and 5 deletions

View File

@@ -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" #include "../compat/endian.h"
#define MAX_ENTROPYUSED 8192 #define MAX_ENTROPYUSED 8192
#define DICE_MINUTXOS 10000 #define DICE_MINUTXOS 15000
extern int32_t KOMODO_INSYNC; extern int32_t KOMODO_INSYNC;
pthread_mutex_t DICE_MUTEX,DICEREVEALED_MUTEX; 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 ( 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); hentropy = DiceHashEntropy(entropy,mtx.vin[0].prevout.hash,mtx.vin[0].prevout.n,1);
mtx.vout.push_back(MakeCC1vout(cp->evalcode,amount,dicepk)); mtx.vout.push_back(MakeCC1vout(cp->evalcode,amount,dicepk));
@@ -1667,7 +1667,7 @@ void *dealer0_loop(void *_arg)
n = sqrt(DICE_MINUTXOS - entropytxs) + 10; n = sqrt(DICE_MINUTXOS - entropytxs) + 10;
for (i=0; i<DICE_MINUTXOS - entropytxs && i<n; i++) for (i=0; i<DICE_MINUTXOS - entropytxs && i<n; i++)
{ {
res = DiceAddfunding(txfee,planstr,dealer0_fundingtxid,COIN/100); res = DiceAddfunding(txfee,planstr,dealer0_fundingtxid,1000*COIN);///100);
if ( res.empty() == 0 && res.size() > 64 && is_hexstr((char *)res.c_str(),0) > 64 ) if ( res.empty() == 0 && res.size() > 64 && is_hexstr((char *)res.c_str(),0) > 64 )
{ {
if ( DecodeHexTx(tx,res) != 0 ) if ( DecodeHexTx(tx,res) != 0 )

View File

@@ -5202,11 +5202,11 @@ bool ProcessNewBlock(bool from_miner,int32_t height,CValidationState &state, CNo
CheckBlockIndex(); CheckBlockIndex();
if (!ret && futureblock == 0) if (!ret && futureblock == 0)
{ {
if ( ASSETCHAINS_SYMBOL[0] == 0 ) /*if ( ASSETCHAINS_SYMBOL[0] == 0 )
{ {
//fprintf(stderr,"request headers from failed process block peer\n"); //fprintf(stderr,"request headers from failed process block peer\n");
pfrom->PushMessage("getheaders", chainActive.GetLocator(chainActive.LastTip()), uint256()); pfrom->PushMessage("getheaders", chainActive.GetLocator(chainActive.LastTip()), uint256());
} }*/
komodo_longestchain(); komodo_longestchain();
return error("%s: AcceptBlock FAILED", __func__); return error("%s: AcceptBlock FAILED", __func__);
} }