Add -testmode command line arg
This commit is contained in:
@@ -289,6 +289,8 @@ void *chainparams_commandline(void *ptr)
|
|||||||
mainParams.SetNValue(ASSETCHAINS_NK[0]);
|
mainParams.SetNValue(ASSETCHAINS_NK[0]);
|
||||||
mainParams.SetKValue(ASSETCHAINS_NK[1]);
|
mainParams.SetKValue(ASSETCHAINS_NK[1]);
|
||||||
}
|
}
|
||||||
|
if ( KOMODO_TESTNODE != 0 )
|
||||||
|
mainParams.SetMiningRequiresPeers(false);
|
||||||
if ( ASSETCHAINS_RPCPORT == 0 )
|
if ( ASSETCHAINS_RPCPORT == 0 )
|
||||||
ASSETCHAINS_RPCPORT = ASSETCHAINS_P2PPORT + 1;
|
ASSETCHAINS_RPCPORT = ASSETCHAINS_P2PPORT + 1;
|
||||||
mainParams.pchMessageStart[0] = ASSETCHAINS_MAGIC & 0xff;
|
mainParams.pchMessageStart[0] = ASSETCHAINS_MAGIC & 0xff;
|
||||||
|
|||||||
@@ -121,6 +121,7 @@ public:
|
|||||||
void SetCheckpointData(CCheckpointData checkpointData);
|
void SetCheckpointData(CCheckpointData checkpointData);
|
||||||
void SetNValue(uint64_t n) { nEquihashN = n; }
|
void SetNValue(uint64_t n) { nEquihashN = n; }
|
||||||
void SetKValue(uint64_t k) { nEquihashK = k; }
|
void SetKValue(uint64_t k) { nEquihashK = k; }
|
||||||
|
void SetMiningRequiresPeers(bool flag) { fMiningRequiresPeers = flag; }
|
||||||
|
|
||||||
//void setnonce(uint32_t nonce) { memcpy(&genesis.nNonce,&nonce,sizeof(nonce)); }
|
//void setnonce(uint32_t nonce) { memcpy(&genesis.nNonce,&nonce,sizeof(nonce)); }
|
||||||
//void settimestamp(uint32_t timestamp) { genesis.nTime = timestamp; }
|
//void settimestamp(uint32_t timestamp) { genesis.nTime = timestamp; }
|
||||||
|
|||||||
@@ -78,6 +78,7 @@ extern std::string DONATION_PUBKEY;
|
|||||||
extern uint8_t ASSETCHAINS_PRIVATE;
|
extern uint8_t ASSETCHAINS_PRIVATE;
|
||||||
extern int32_t USE_EXTERNAL_PUBKEY;
|
extern int32_t USE_EXTERNAL_PUBKEY;
|
||||||
extern char NOTARYADDRS[64][64];
|
extern char NOTARYADDRS[64][64];
|
||||||
|
extern int32_t KOMODO_TESTNODE;
|
||||||
int tx_height( const uint256 &hash );
|
int tx_height( const uint256 &hash );
|
||||||
extern std::vector<std::string> vWhiteListAddress;
|
extern std::vector<std::string> vWhiteListAddress;
|
||||||
void komodo_netevent(std::vector<uint8_t> payload);
|
void komodo_netevent(std::vector<uint8_t> payload);
|
||||||
|
|||||||
@@ -109,6 +109,8 @@ uint64_t PENDING_KOMODO_TX;
|
|||||||
extern int32_t KOMODO_LOADINGBLOCKS;
|
extern int32_t KOMODO_LOADINGBLOCKS;
|
||||||
unsigned int MAX_BLOCK_SIGOPS = 20000;
|
unsigned int MAX_BLOCK_SIGOPS = 20000;
|
||||||
|
|
||||||
|
int32_t KOMODO_TESTNODE;
|
||||||
|
|
||||||
struct komodo_kv *KOMODO_KV;
|
struct komodo_kv *KOMODO_KV;
|
||||||
pthread_mutex_t KOMODO_KV_mutex,KOMODO_CC_mutex;
|
pthread_mutex_t KOMODO_KV_mutex,KOMODO_CC_mutex;
|
||||||
|
|
||||||
|
|||||||
@@ -1710,6 +1710,7 @@ void komodo_args(char *argv0)
|
|||||||
DONATION_PUBKEY = GetArg("-donation", "");
|
DONATION_PUBKEY = GetArg("-donation", "");
|
||||||
NOTARY_PUBKEY = GetArg("-pubkey", "");
|
NOTARY_PUBKEY = GetArg("-pubkey", "");
|
||||||
KOMODO_DEALERNODE = GetArg("-dealer",0);
|
KOMODO_DEALERNODE = GetArg("-dealer",0);
|
||||||
|
KOMODO_TESTNODE = GetArg("-testnode",0);
|
||||||
if ( strlen(NOTARY_PUBKEY.c_str()) == 66 )
|
if ( strlen(NOTARY_PUBKEY.c_str()) == 66 )
|
||||||
{
|
{
|
||||||
decode_hex(NOTARY_PUBKEY33,33,(char *)NOTARY_PUBKEY.c_str());
|
decode_hex(NOTARY_PUBKEY33,33,(char *)NOTARY_PUBKEY.c_str());
|
||||||
|
|||||||
@@ -24,6 +24,7 @@ int32_t ASSETCHAINS_LWMAPOS = 0;
|
|||||||
int32_t VERUS_BLOCK_POSUNITS = 1000;
|
int32_t VERUS_BLOCK_POSUNITS = 1000;
|
||||||
int32_t ASSETCHAINS_OVERWINTER = 227520;
|
int32_t ASSETCHAINS_OVERWINTER = 227520;
|
||||||
int32_t ASSETCHAINS_SAPLING = 227520;
|
int32_t ASSETCHAINS_SAPLING = 227520;
|
||||||
|
int32_t KOMODO_TESTNODE = 0;
|
||||||
|
|
||||||
unsigned int MAX_BLOCK_SIGOPS = 20000;
|
unsigned int MAX_BLOCK_SIGOPS = 20000;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user