DEALER NODE
This commit is contained in:
@@ -51,7 +51,7 @@ one other technical note is that komodod has the insight-explorer extensions bui
|
|||||||
#include "../utlist.h"
|
#include "../utlist.h"
|
||||||
#include "../uthash.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 uint32_t ASSETCHAINS_CC;
|
||||||
extern char ASSETCHAINS_SYMBOL[];
|
extern char ASSETCHAINS_SYMBOL[];
|
||||||
extern std::string CCerror;
|
extern std::string CCerror;
|
||||||
|
|||||||
@@ -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 )
|
if ( (iswin= DiceIsWinner(entropy,entropyvout,txid,tx,vinTx,hash,sbits,minbet,maxbet,maxodds,timeoutblocks,fundingtxid)) != 0 )
|
||||||
{
|
{
|
||||||
// will only happen for fundingPubKey
|
// will only happen for fundingPubKey
|
||||||
if ( KOMODO_INSYNC != 0 )
|
if ( KOMODO_INSYNC != 0 && KOMODO_DEALERNODE != 0 )
|
||||||
DiceQueue(iswin,sbits,fundingtxid,txid,tx,entropyvout);
|
DiceQueue(iswin,sbits,fundingtxid,txid,tx,entropyvout);
|
||||||
}
|
}
|
||||||
else
|
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;
|
CTransaction tx; uint64_t entropyval; uint256 entropytxid; int32_t entropytxs;
|
||||||
DicePlanFunds(entropyval,entropytxid,refsbits,cp,dicepk,fundingtxid,entropytxs,false);
|
DicePlanFunds(entropyval,entropytxid,refsbits,cp,dicepk,fundingtxid,entropytxs,false);
|
||||||
if ( entropytxs < DICE_MINUTXOS )
|
if ( entropytxs < DICE_MINUTXOS )
|
||||||
{
|
{
|
||||||
n = 10;//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,fundingtxid,COIN/100);
|
res = DiceAddfunding(txfee,planstr,fundingtxid,COIN/100);
|
||||||
|
|||||||
@@ -45,7 +45,7 @@ struct komodo_state KOMODO_STATES[34];
|
|||||||
#define _COINBASE_MATURITY 100
|
#define _COINBASE_MATURITY 100
|
||||||
int COINBASE_MATURITY = _COINBASE_MATURITY;//100;
|
int COINBASE_MATURITY = _COINBASE_MATURITY;//100;
|
||||||
|
|
||||||
int32_t KOMODO_MININGTHREADS = -1,IS_KOMODO_NOTARY,USE_EXTERNAL_PUBKEY,KOMODO_CHOSEN_ONE,ASSETCHAINS_SEED,KOMODO_ON_DEMAND,KOMODO_EXTERNAL_NOTARIES,KOMODO_PASSPORT_INITDONE,KOMODO_PAX,KOMODO_EXCHANGEWALLET,KOMODO_REWIND,KOMODO_CONNECTING = -1;
|
int32_t KOMODO_MININGTHREADS = -1,IS_KOMODO_NOTARY,USE_EXTERNAL_PUBKEY,KOMODO_CHOSEN_ONE,ASSETCHAINS_SEED,KOMODO_ON_DEMAND,KOMODO_EXTERNAL_NOTARIES,KOMODO_PASSPORT_INITDONE,KOMODO_PAX,KOMODO_EXCHANGEWALLET,KOMODO_REWIND,KOMODO_CONNECTING = -1,KOMODO_DEALERNODE;
|
||||||
int32_t KOMODO_INSYNC,KOMODO_LASTMINED,prevKOMODO_LASTMINED,KOMODO_CCACTIVATE,JUMBLR_PAUSE = 1;
|
int32_t KOMODO_INSYNC,KOMODO_LASTMINED,prevKOMODO_LASTMINED,KOMODO_CCACTIVATE,JUMBLR_PAUSE = 1;
|
||||||
std::string NOTARY_PUBKEY,ASSETCHAINS_NOTARIES,ASSETCHAINS_OVERRIDE_PUBKEY,DONATION_PUBKEY,ASSETCHAINS_SCRIPTPUB;
|
std::string NOTARY_PUBKEY,ASSETCHAINS_NOTARIES,ASSETCHAINS_OVERRIDE_PUBKEY,DONATION_PUBKEY,ASSETCHAINS_SCRIPTPUB;
|
||||||
uint8_t NOTARY_PUBKEY33[33],ASSETCHAINS_OVERRIDE_PUBKEY33[33],ASSETCHAINS_OVERRIDE_PUBKEYHASH[20],ASSETCHAINS_PUBLIC,ASSETCHAINS_PRIVATE,ASSETCHAINS_TXPOW,ASSETCHAINS_FOUNDERS;
|
uint8_t NOTARY_PUBKEY33[33],ASSETCHAINS_OVERRIDE_PUBKEY33[33],ASSETCHAINS_OVERRIDE_PUBKEYHASH[20],ASSETCHAINS_PUBLIC,ASSETCHAINS_PRIVATE,ASSETCHAINS_TXPOW,ASSETCHAINS_FOUNDERS;
|
||||||
|
|||||||
@@ -1512,6 +1512,7 @@ void komodo_args(char *argv0)
|
|||||||
fprintf(stderr,"KOMODO_EXCHANGEWALLET mode active\n");
|
fprintf(stderr,"KOMODO_EXCHANGEWALLET mode active\n");
|
||||||
DONATION_PUBKEY = GetArg("-donation", "");
|
DONATION_PUBKEY = GetArg("-donation", "");
|
||||||
NOTARY_PUBKEY = GetArg("-pubkey", "");
|
NOTARY_PUBKEY = GetArg("-pubkey", "");
|
||||||
|
KOMODO_DEALERNODE = GetArg("-dealer",0);
|
||||||
if ( strlen(NOTARY_PUBKEY.c_str()) == 66 )
|
if ( strlen(NOTARY_PUBKEY.c_str()) == 66 )
|
||||||
{
|
{
|
||||||
USE_EXTERNAL_PUBKEY = 1;
|
USE_EXTERNAL_PUBKEY = 1;
|
||||||
|
|||||||
Reference in New Issue
Block a user