Merge pull request #1082 from jl777/jl777
reduce too strict error checking during sync that could case valid peers to be banned
This commit is contained in:
@@ -39,7 +39,7 @@ echo $pubkey
|
||||
~/VerusCoin/src/komodod -pubkey=$pubkey -ac_name=VRSC -ac_algo=verushash -ac_cc=1 -ac_veruspos=50 -ac_supply=0 -ac_eras=3 -ac_reward=0,38400000000,2400000000 -ac_halving=1,43200,1051920 -ac_decay=100000000,0,0 -ac_end=10080,226080,0 -ac_timelockgte=19200000000 -ac_timeunlockfrom=129600 -ac_timeunlockto=1180800 -addnode=185.25.48.236 -addnode=185.64.105.111 &
|
||||
./komodod -pubkey=$pubkey -ac_name=SEC -ac_cc=333 -ac_supply=1000000000 -addnode=185.148.145.43 &
|
||||
./komodod -pubkey=$pubkey -ac_name=CCL -ac_supply=200000000 -ac_end=1 -ac_cc=2 -addressindex=1 -spentindex=1 -addnode=142.93.136.89 -addnode=195.201.22.89 &
|
||||
./komodod -pubkey=$pubkey -ac_name=PIRATE -ac_supply=0 -ac_reward=25600000000 -ac_halving=77777 -ac_private=1 -addnode=136.243.102.225 &
|
||||
./komodod -pubkey=$pubkey -ac_name=PIRATE -ac_supply=0 -ac_reward=25600000000 -ac_halving=77777 -ac_private=1 -addnode=178.63.77.56 &
|
||||
./komodod -pubkey=$pubkey -ac_name=MGNX -ac_supply=12465003 -ac_staked=90 -ac_reward=2000000000 -ac_halving=525960 -ac_cc=2 -ac_end=2629800 -addnode=142.93.27.180 &
|
||||
./komodod -pubkey=$pubkey -ac_name=PGT -ac_supply=10000000 -ac_end=1 -addnode=190.114.254.104 &
|
||||
./komodod -pubkey=$pubkey -ac_name=KMDICE -ac_supply=10500000 -ac_reward=2500000000 -ac_halving=210000 -ac_cc=2 -addressindex=1 -spentindex=1 -addnode=144.76.217.232 &
|
||||
|
||||
@@ -908,7 +908,7 @@ int32_t main(int32_t argc,char **argv)
|
||||
zsaddr = clonestr(argv[2]);
|
||||
printf("%s: %s %s\n",REFCOIN_CLI,coinstr,zsaddr);
|
||||
uint32_t lastopid; char coinaddr[64],zcaddr[128],opidstr[128]; int32_t finished; int64_t amount,stdamount,txfee;
|
||||
stdamount = 500 * SATOSHIDEN;
|
||||
//stdamount = 500 * SATOSHIDEN;
|
||||
txfee = 10000;
|
||||
again:
|
||||
printf("start processing zmigrate\n");
|
||||
@@ -932,6 +932,18 @@ again:
|
||||
if ( (amount= find_sprout_amount(coinstr,zcaddr)) > txfee )
|
||||
{
|
||||
// generate taddr, send max of 10000.0001
|
||||
static int64_t lastamount,lastamount2,lastamount3,lastamount4;
|
||||
stdamount = 500 * SATOSHIDEN;
|
||||
if ( amount == lastamount && amount == lastamount2 )
|
||||
{
|
||||
stdamount /= 10;
|
||||
if ( amount == lastamount3 && amount == lastamount4 )
|
||||
stdamount /= 5;
|
||||
}
|
||||
lastamount4 = lastamount3;
|
||||
lastamount3 = lastamount2;
|
||||
lastamount2 = lastamount;
|
||||
lastamount = amount;
|
||||
if ( amount > stdamount+txfee )
|
||||
amount = stdamount + txfee;
|
||||
if ( getnewaddress(coinaddr,coinstr,"") == 0 )
|
||||
|
||||
13
src/main.cpp
13
src/main.cpp
@@ -1020,10 +1020,9 @@ bool ContextualCheckTransaction(
|
||||
|
||||
// If Sprout rules apply, reject transactions which are intended for Overwinter and beyond
|
||||
if (isSprout && tx.fOverwintered) {
|
||||
return state.DoS(isInitBlockDownload() ? 0 : dosLevel,
|
||||
error("ContextualCheckTransaction(): ht.%d activates.%d dosLevel.%d overwinter is not active yet",
|
||||
nHeight, Params().GetConsensus().vUpgrades[Consensus::UPGRADE_OVERWINTER].nActivationHeight, dosLevel),
|
||||
REJECT_INVALID, "tx-overwinter-not-active");
|
||||
int32_t ht = Params().GetConsensus().vUpgrades[Consensus::UPGRADE_OVERWINTER].nActivationHeight;
|
||||
return state.DoS((ht < 0 || nHeight < ht) ? 0 : dosLevel,error("ContextualCheckTransaction(): ht.%d activates.%d dosLevel.%d overwinter is not active yet",nHeight, Params().GetConsensus().vUpgrades[Consensus::UPGRADE_OVERWINTER].nActivationHeight, dosLevel),REJECT_INVALID, "tx-overwinter-not-active");
|
||||
//return state.DoS(isInitBlockDownload() ? 0 : dosLevel,error("ContextualCheckTransaction(): ht.%d activates.%d dosLevel.%d overwinter is not active yet",nHeight, Params().GetConsensus().vUpgrades[Consensus::UPGRADE_OVERWINTER].nActivationHeight, dosLevel),REJECT_INVALID, "tx-overwinter-not-active");
|
||||
}
|
||||
|
||||
if (saplingActive) {
|
||||
@@ -1080,8 +1079,8 @@ bool ContextualCheckTransaction(
|
||||
if (overwinterActive) {
|
||||
// Reject transactions intended for Sprout
|
||||
if (!tx.fOverwintered) {
|
||||
return state.DoS(dosLevel, error("ContextualCheckTransaction: overwinter is active"),
|
||||
REJECT_INVALID, "tx-overwinter-active");
|
||||
int32_t ht = Params().GetConsensus().vUpgrades[Consensus::UPGRADE_OVERWINTER].nActivationHeight;
|
||||
return state.DoS((ht < 0 || nHeight < ht) ? 0 : dosLevel, error("ContextualCheckTransaction: overwinter is active"),REJECT_INVALID, "tx-overwinter-active");
|
||||
}
|
||||
|
||||
// Check that all transactions are unexpired
|
||||
@@ -1446,7 +1445,7 @@ bool CheckTransactionWithoutProofVerification(uint32_t tiptime,const CTransactio
|
||||
if ( ASSETCHAINS_PRIVATE != 0 && invalid_private_taddr != 0 )
|
||||
{
|
||||
static uint32_t counter;
|
||||
//if ( counter++ < 10 )
|
||||
if ( counter++ < 10 )
|
||||
fprintf(stderr,"found taddr in private chain: z_z.%d z_t.%d t_z.%d vinsize.%d\n",z_z,z_t,t_z,(int32_t)tx.vin.size());
|
||||
if ( z_t == 0 || z_z != 0 || t_z != 0 || tx.vin.size() != 0 )
|
||||
return state.DoS(100, error("CheckTransaction(): this is a private chain, only sprout -> taddr allowed until deadline"),REJECT_INVALID, "bad-txns-acprivacy-chain");
|
||||
|
||||
Reference in New Issue
Block a user