From 3424c9cb2875d7e0710f00a42e8864d6f41a69d6 Mon Sep 17 00:00:00 2001 From: jl777 Date: Sun, 11 Nov 2018 08:41:29 -1100 Subject: [PATCH] DEALER NODE --- src/cc/CCinclude.h | 2 +- src/cc/dice.cpp | 6 +++--- src/komodo_globals.h | 2 +- src/komodo_utils.h | 1 + 4 files changed, 6 insertions(+), 5 deletions(-) diff --git a/src/cc/CCinclude.h b/src/cc/CCinclude.h index 83642f020..affb57c99 100644 --- a/src/cc/CCinclude.h +++ b/src/cc/CCinclude.h @@ -51,7 +51,7 @@ one other technical note is that komodod has the insight-explorer extensions bui #include "../utlist.h" #include "../uthash.h" -extern int32_t KOMODO_CONNECTING,KOMODO_CCACTIVATE; +extern int32_t KOMODO_CONNECTING,KOMODO_CCACTIVATE,KOMODO_DEALERNODE; extern uint32_t ASSETCHAINS_CC; extern char ASSETCHAINS_SYMBOL[]; extern std::string CCerror; diff --git a/src/cc/dice.cpp b/src/cc/dice.cpp index 1a1d7377e..7b5c6a9c3 100644 --- a/src/cc/dice.cpp +++ b/src/cc/dice.cpp @@ -975,7 +975,7 @@ bool DiceValidate(struct CCcontract_info *cp,Eval *eval,const CTransaction &tx) if ( (iswin= DiceIsWinner(entropy,entropyvout,txid,tx,vinTx,hash,sbits,minbet,maxbet,maxodds,timeoutblocks,fundingtxid)) != 0 ) { // will only happen for fundingPubKey - if ( KOMODO_INSYNC != 0 ) + if ( KOMODO_INSYNC != 0 && KOMODO_DEALERNODE != 0 ) DiceQueue(iswin,sbits,fundingtxid,txid,tx,entropyvout); } else @@ -1735,13 +1735,13 @@ double DiceStatus(uint64_t txfee,char *planstr,uint256 fundingtxid,uint256 bettx } } } - if ( 0 && scriptPubKey == fundingPubKey ) + if ( KOMODO_DEALERNODE == 0 && scriptPubKey == fundingPubKey ) { CTransaction tx; uint64_t entropyval; uint256 entropytxid; int32_t entropytxs; DicePlanFunds(entropyval,entropytxid,refsbits,cp,dicepk,fundingtxid,entropytxs,false); if ( entropytxs < DICE_MINUTXOS ) { - n = 10;//sqrt(DICE_MINUTXOS - entropytxs) + 10; + n = sqrt(DICE_MINUTXOS - entropytxs) + 10; for (i=0; i