Merge branch 'dev' into lockzins
This commit is contained in:
@@ -556,12 +556,7 @@ static const char *notaries_list[NUM_HUSH_SEASONS][NUM_HUSH_NOTARIES][2] =
|
||||
#define HUSH_BIT63SET(x) ((x) & ((uint64_t)1 << 63))
|
||||
#define HUSH_VALUETOOBIG(x) ((x) > (uint64_t)10000000001*COIN)
|
||||
|
||||
//#ifndef TESTMODE
|
||||
#define PRICES_DAYWINDOW ((3600*24/ASSETCHAINS_BLOCKTIME) + 1)
|
||||
//#else
|
||||
//#define PRICES_DAYWINDOW (7)
|
||||
//#endif
|
||||
|
||||
extern uint8_t ASSETCHAINS_CLEARNET;
|
||||
extern uint8_t ASSETCHAINS_TXPOW,ASSETCHAINS_PUBLIC;
|
||||
extern int8_t ASSETCHAINS_ADAPTIVEPOW;
|
||||
int32_t MAX_BLOCK_SIZE(int32_t height);
|
||||
@@ -622,12 +617,8 @@ int32_t hush_heightpricebits(uint64_t *seedp,uint32_t *heightbits,int32_t nHeigh
|
||||
char *hush_pricename(char *name,int32_t ind);
|
||||
int32_t hush_priceind(const char *symbol);
|
||||
int32_t hush_pricesinit();
|
||||
int64_t hush_priceave(int64_t *tmpbuf,int64_t *correlated,int32_t cskip);
|
||||
int64_t hush_pricecorrelated(uint64_t seed,int32_t ind,uint32_t *rawprices,int32_t rawskip,uint32_t *nonzprices,int32_t smoothwidth);
|
||||
int32_t hush_nextheight();
|
||||
uint32_t hush_heightstamp(int32_t height);
|
||||
int64_t hush_pricemult(int32_t ind);
|
||||
int32_t hush_priceget(int64_t *buf64,int32_t ind,int32_t height,int32_t numblocks);
|
||||
int32_t hush_currentheight();
|
||||
int32_t hush_notarized_bracket(struct notarized_checkpoint *nps[2],int32_t height);
|
||||
arith_uint256 hush_adaptivepow_target(int32_t height,arith_uint256 bnTarget,uint32_t nTime);
|
||||
|
||||
1510
src/hush_gateway.h
1510
src/hush_gateway.h
File diff suppressed because it is too large
Load Diff
@@ -50,6 +50,7 @@ int32_t HUSH_INSYNC,HUSH_LASTMINED,prevHUSH_LASTMINED,HUSH_CCACTIVATE;
|
||||
std::string NOTARY_PUBKEY,ASSETCHAINS_NOTARIES,ASSETCHAINS_OVERRIDE_PUBKEY,DONATION_PUBKEY,ASSETCHAINS_SCRIPTPUB,NOTARY_ADDRESS,ASSETCHAINS_SELFIMPORT,ASSETCHAINS_CCLIB;
|
||||
uint8_t NOTARY_PUBKEY33[33],ASSETCHAINS_OVERRIDE_PUBKEY33[33],ASSETCHAINS_OVERRIDE_PUBKEYHASH[20],ASSETCHAINS_PUBLIC,ASSETCHAINS_PRIVATE,ASSETCHAINS_TXPOW,ASSETCHAINS_MARMARA;
|
||||
int8_t ASSETCHAINS_ADAPTIVEPOW;
|
||||
uint8_t ASSETCHAINS_CLEARNET = 1;
|
||||
uint8_t ASSETCHAINS_BURN = 0;
|
||||
uint32_t ASSETCHAINS_MINOPRETURNFEE = 0;
|
||||
std::vector<uint8_t> Mineropret;
|
||||
|
||||
@@ -1853,6 +1853,7 @@ void hush_args(char *argv0)
|
||||
Split(GetArg("-ac_nk",""), sizeof(ASSETCHAINS_NK)/sizeof(*ASSETCHAINS_NK), ASSETCHAINS_NK, 0);
|
||||
|
||||
ASSETCHAINS_BURN = GetArg("-ac_burn", 0);
|
||||
ASSETCHAINS_CLEARNET = GetArg("-ac_clearnet", 1);
|
||||
ASSETCHAINS_MINOPRETURNFEE = GetArg("-ac_minopreturnfee", 0);
|
||||
|
||||
// -ac_ccactivateht=evalcode,height,evalcode,height,evalcode,height....
|
||||
@@ -2180,7 +2181,7 @@ void hush_args(char *argv0)
|
||||
}
|
||||
}
|
||||
|
||||
if ( ASSETCHAINS_ENDSUBSIDY[0] != 0 || ASSETCHAINS_REWARD[0] != 0 || ASSETCHAINS_HALVING[0] != 0 || ASSETCHAINS_DECAY[0] != 0 || ASSETCHAINS_COMMISSION != 0 || ASSETCHAINS_PUBLIC != 0 || ASSETCHAINS_PRIVATE != 0 || ASSETCHAINS_TXPOW != 0 || ASSETCHAINS_FOUNDERS != 0 || ASSETCHAINS_SCRIPTPUB.size() > 1 || ASSETCHAINS_SELFIMPORT.size() > 0 || ASSETCHAINS_OVERRIDE_PUBKEY33[0] != 0 || ASSETCHAINS_TIMELOCKGTE != _ASSETCHAINS_TIMELOCKOFF|| ASSETCHAINS_ALGO != ASSETCHAINS_EQUIHASH || ASSETCHAINS_LWMAPOS != 0 || ASSETCHAINS_LASTERA > 0 || ASSETCHAINS_BEAMPORT != 0 || ASSETCHAINS_CODAPORT != 0 || ASSETCHAINS_MARMARA != 0 || nonz > 0 || ASSETCHAINS_CCLIB.size() > 0 || ASSETCHAINS_FOUNDERS_REWARD != 0 || ASSETCHAINS_NOTARY_PAY[0] != 0 || ASSETCHAINS_BLOCKTIME != 60 || ASSETCHAINS_CBOPRET != 0 || Mineropret.size() != 0 || (ASSETCHAINS_NK[0] != 0 && ASSETCHAINS_NK[1] != 0) || HUSH_SNAPSHOT_INTERVAL != 0 || ASSETCHAINS_EARLYTXIDCONTRACT != 0 || ASSETCHAINS_CBMATURITY != 0 || ASSETCHAINS_ADAPTIVEPOW != 0 || ASSETCHAINS_BURN != 0 || ASSETCHAINS_MINOPRETURNFEE)
|
||||
if ( ASSETCHAINS_ENDSUBSIDY[0] != 0 || ASSETCHAINS_REWARD[0] != 0 || ASSETCHAINS_HALVING[0] != 0 || ASSETCHAINS_DECAY[0] != 0 || ASSETCHAINS_COMMISSION != 0 || ASSETCHAINS_PUBLIC != 0 || ASSETCHAINS_PRIVATE != 0 || ASSETCHAINS_TXPOW != 0 || ASSETCHAINS_FOUNDERS != 0 || ASSETCHAINS_SCRIPTPUB.size() > 1 || ASSETCHAINS_SELFIMPORT.size() > 0 || ASSETCHAINS_OVERRIDE_PUBKEY33[0] != 0 || ASSETCHAINS_TIMELOCKGTE != _ASSETCHAINS_TIMELOCKOFF|| ASSETCHAINS_ALGO != ASSETCHAINS_EQUIHASH || ASSETCHAINS_LWMAPOS != 0 || ASSETCHAINS_LASTERA > 0 || ASSETCHAINS_BEAMPORT != 0 || ASSETCHAINS_CODAPORT != 0 || ASSETCHAINS_MARMARA != 0 || nonz > 0 || ASSETCHAINS_CCLIB.size() > 0 || ASSETCHAINS_FOUNDERS_REWARD != 0 || ASSETCHAINS_NOTARY_PAY[0] != 0 || ASSETCHAINS_BLOCKTIME != 60 || ASSETCHAINS_CBOPRET != 0 || Mineropret.size() != 0 || (ASSETCHAINS_NK[0] != 0 && ASSETCHAINS_NK[1] != 0) || HUSH_SNAPSHOT_INTERVAL != 0 || ASSETCHAINS_EARLYTXIDCONTRACT != 0 || ASSETCHAINS_CBMATURITY != 0 || ASSETCHAINS_ADAPTIVEPOW != 0 || ASSETCHAINS_BURN != 0 || ASSETCHAINS_MINOPRETURNFEE || (ASSETCHAINS_CLEARNET == 0) )
|
||||
{
|
||||
if(fDebug)
|
||||
fprintf(stderr,"perc %.4f%% ac_pub=[%02x%02x%02x...] acsize.%d\n",dstr(ASSETCHAINS_COMMISSION)*100,ASSETCHAINS_OVERRIDE_PUBKEY33[0],ASSETCHAINS_OVERRIDE_PUBKEY33[1],ASSETCHAINS_OVERRIDE_PUBKEY33[2],(int32_t)ASSETCHAINS_SCRIPTPUB.size());
|
||||
@@ -2350,6 +2351,11 @@ void hush_args(char *argv0)
|
||||
{
|
||||
extralen += dragon_rwnum(1,&extraptr[extralen],sizeof(ASSETCHAINS_MINOPRETURNFEE),(void *)&ASSETCHAINS_MINOPRETURNFEE);
|
||||
}
|
||||
|
||||
if ( ASSETCHAINS_CLEARNET == 0 )
|
||||
{
|
||||
extralen += dragon_rwnum(1,&extraptr[extralen],sizeof(ASSETCHAINS_CLEARNET),(void *)&ASSETCHAINS_CLEARNET);
|
||||
}
|
||||
}
|
||||
|
||||
addn = GetArg("-seednode","");
|
||||
|
||||
@@ -606,6 +606,7 @@ std::string HelpMessage(HelpMessageMode mode)
|
||||
strUsage += HelpMessageOpt("-ac_burn", _("Allow sending funds to the transparent burn address when -ac_private=1"));
|
||||
strUsage += HelpMessageOpt("-ac_minopreturnfee", _("OP_RETURN minimum fee per tx, regardless of tx size, default is 1 coin"));
|
||||
strUsage += HelpMessageOpt("-ac_coda", _("CODA integration"));
|
||||
strUsage += HelpMessageOpt("-ac_clearnet", _("Enable or disable clearnet connections for the entire blockchain. Setting to 0 will disable clearnet and use sane defaults for Tor/i2p and require all nodes to do the same") + " " + strprintf(_("(default: %u)"), DEFAULT_CLEARNET));
|
||||
strUsage += HelpMessageOpt("-ac_decay", _("Percentage of block reward decrease at each halving"));
|
||||
strUsage += HelpMessageOpt("-ac_end", _("Block height at which block rewards will end"));
|
||||
strUsage += HelpMessageOpt("-ac_eras", _("Block reward eras"));
|
||||
@@ -1647,8 +1648,8 @@ bool AppInit2(boost::thread_group& threadGroup, CScheduler& scheduler)
|
||||
}
|
||||
//fprintf(stderr,"%s tik18\n", __FUNCTION__);
|
||||
|
||||
// Disable clearnet peers if -clearnet=0
|
||||
if (!GetBoolArg("-clearnet", DEFAULT_CLEARNET)) {
|
||||
// Disable clearnet peers if -clearnet=0 for this node or -ac_clearnet=0 for this chain
|
||||
if (ASSETCHAINS_CLEARNET == 0 || !GetBoolArg("-clearnet", DEFAULT_CLEARNET)) {
|
||||
#ifdef ENABLE_MINING
|
||||
// mining to the same taddr links different txs together as from the same owner
|
||||
// and if using -clearnet=0 that can be used to link together different .onions
|
||||
|
||||
@@ -116,7 +116,7 @@ extern char SMART_CHAIN_SYMBOL[HUSH_SMART_CHAIN_MAXLEN];
|
||||
extern uint64_t ASSETCHAINS_ENDSUBSIDY[ASSETCHAINS_MAX_ERAS+1], ASSETCHAINS_REWARD[ASSETCHAINS_MAX_ERAS+1], ASSETCHAINS_HALVING[ASSETCHAINS_MAX_ERAS+1];
|
||||
extern uint32_t ASSETCHAINS_MAGIC;
|
||||
extern uint64_t ASSETCHAINS_LINEAR,ASSETCHAINS_COMMISSION,ASSETCHAINS_SUPPLY;
|
||||
extern uint8_t ASSETCHAINS_PUBLIC,ASSETCHAINS_PRIVATE;
|
||||
extern uint8_t ASSETCHAINS_PUBLIC,ASSETCHAINS_PRIVATE,ASSETCHAINS_CLEARNET;
|
||||
extern int32_t ASSETCHAINS_STAKED;
|
||||
extern uint64_t ASSETCHAINS_CBOPRET;
|
||||
|
||||
|
||||
@@ -1055,9 +1055,6 @@ UniValue notaries(const UniValue& params, bool fHelp, const CPubKey& mypk)
|
||||
return ret;
|
||||
}
|
||||
|
||||
int32_t hush_pending_withdraws(char *opretstr);
|
||||
extern char CURRENCIES[][8];
|
||||
|
||||
UniValue gettxout(const UniValue& params, bool fHelp, const CPubKey& mypk)
|
||||
{
|
||||
if (fHelp || params.size() < 2 || params.size() > 3)
|
||||
|
||||
Reference in New Issue
Block a user