Browse Source

Merge pull request #368 from Asherda/dev

Dev
pull/433/head v0.9.0
Asher Dawes 3 years ago
committed by GitHub
parent
commit
4c7a0a68dd
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 28
      contrib/seeds/nodes_test.txt
  2. 28
      src/chainparamsseeds.h
  3. 1
      src/coins.cpp
  4. 2
      src/init.cpp
  5. 2
      src/komodo_utils.h
  6. 19
      src/main.cpp

28
contrib/seeds/nodes_test.txt

@ -1,17 +1,17 @@
# List of fixed seed nodes for testnet
116.203.95.63:25661
159.69.55.214:25661
95.216.207.181:25661
192.46.230.10:25661
45.33.4.79:25661
185.25.48.236:25661
185.64.105.111:25661
116.203.95.63:20655
159.69.55.214:20655
95.216.207.181:20655
192.46.230.10:20655
45.33.4.79:20655
185.25.48.236:20655
185.64.105.111:20655
[2a01:4f8:c0c:f42e::1]:25661
[2a01:4f8:c010:2555::1]:25661
[2a01:4f9:c010:bbad::1]:25661
[2400:8901::f03c:92ff:fe44:9542]:25661
[2600:3c00::f03c:92ff:fe44:95b3]:25661
[2a04:2180:0:2::149]:25661
[2a04:2180:0:2::29]:25661
[2a01:4f8:c0c:f42e::1]:20655
[2a01:4f8:c010:2555::1]:20655
[2a01:4f9:c010:bbad::1]:20655
[2400:8901::f03c:92ff:fe44:9542]:20655
[2600:3c00::f03c:92ff:fe44:95b3]:20655
[2a04:2180:0:2::149]:20655
[2a04:2180:0:2::29]:20655

28
src/chainparamsseeds.h

@ -33,19 +33,19 @@ static SeedSpec6 pnSeed6_main[] = {
};
static SeedSpec6 pnSeed6_test[] = {
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x74,0xcb,0x5f,0x3f}, 25661},
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x9f,0x45,0x37,0xd6}, 25661},
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x5f,0xd8,0xcf,0xb5}, 25661},
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xc0,0x2e,0xe6,0x0a}, 25661},
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x2d,0x21,0x04,0x4f}, 25661},
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xb9,0x19,0x30,0xec}, 25661},
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xb9,0x40,0x69,0x6f}, 25661},
{{0x2a,0x01,0x04,0xf8,0x0c,0x0c,0xf4,0x2e,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01}, 25661},
{{0x2a,0x01,0x04,0xf8,0xc0,0x10,0x25,0x55,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01}, 25661},
{{0x2a,0x01,0x04,0xf9,0xc0,0x10,0xbb,0xad,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01}, 25661},
{{0x24,0x00,0x89,0x01,0x00,0x00,0x00,0x00,0xf0,0x3c,0x92,0xff,0xfe,0x44,0x95,0x42}, 25661},
{{0x26,0x00,0x3c,0x00,0x00,0x00,0x00,0x00,0xf0,0x3c,0x92,0xff,0xfe,0x44,0x95,0xb3}, 25661},
{{0x2a,0x04,0x21,0x80,0x00,0x00,0x00,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x49}, 25661},
{{0x2a,0x04,0x21,0x80,0x00,0x00,0x00,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x29}, 25661}
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x74,0xcb,0x5f,0x3f}, 20655},
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x9f,0x45,0x37,0xd6}, 20655},
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x5f,0xd8,0xcf,0xb5}, 20655},
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xc0,0x2e,0xe6,0x0a}, 20655},
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x2d,0x21,0x04,0x4f}, 20655},
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xb9,0x19,0x30,0xec}, 20655},
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xb9,0x40,0x69,0x6f}, 20655},
{{0x2a,0x01,0x04,0xf8,0x0c,0x0c,0xf4,0x2e,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01}, 20655},
{{0x2a,0x01,0x04,0xf8,0xc0,0x10,0x25,0x55,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01}, 20655},
{{0x2a,0x01,0x04,0xf9,0xc0,0x10,0xbb,0xad,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01}, 20655},
{{0x24,0x00,0x89,0x01,0x00,0x00,0x00,0x00,0xf0,0x3c,0x92,0xff,0xfe,0x44,0x95,0x42}, 20655},
{{0x26,0x00,0x3c,0x00,0x00,0x00,0x00,0x00,0xf0,0x3c,0x92,0xff,0xfe,0x44,0x95,0xb3}, 20655},
{{0x2a,0x04,0x21,0x80,0x00,0x00,0x00,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x49}, 20655},
{{0x2a,0x04,0x21,0x80,0x00,0x00,0x00,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x29}, 20655}
};
#endif // BITCOIN_CHAINPARAMSSEEDS_H

1
src/coins.cpp

@ -623,6 +623,7 @@ CAmount CCoinsViewCache::GetValueIn(int32_t nHeight, int64_t *interestp, const C
}
else
{
printf("%s: input #%d not available in view. returning 0\n", __func__, i);
return 0;
}

2
src/init.cpp

@ -1218,7 +1218,7 @@ bool AppInit2(boost::thread_group& threadGroup, CScheduler& scheduler)
CConstVerusSolutionVector::activationHeight.SetActivationHeight(CActivationHeight::SOLUTION_VERUSV4, 800200);
CConstVerusSolutionVector::activationHeight.SetActivationHeight(CActivationHeight::SOLUTION_VERUSV5, 1053660);
CConstVerusSolutionVector::activationHeight.SetActivationHeight(CActivationHeight::SOLUTION_VERUSV5_1, 1053660);
CConstVerusSolutionVector::activationHeight.SetActivationHeight(CActivationHeight::SOLUTION_VERUSV6, 1787000);
CConstVerusSolutionVector::activationHeight.SetActivationHeight(CActivationHeight::SOLUTION_VERUSV6, 1796400);
}
else if (IsVerusActive())
{

2
src/komodo_utils.h

@ -1860,7 +1860,7 @@ void komodo_args(char *argv0)
LogPrintf("Config file for %s not found.\n", name.c_str());
}
std::string halving = GetArg("-ac_halving", mapArgs.count("-ac_halving") ? mapArgs["-ac_halving"] : "1170000"); // this assignment is required for an ARM compiler workaround
std::string halving = GetArg("-ac_halving", mapArgs.count("-ac_halving") ? mapArgs["-ac_halving"] : "1174000"); // this assignment is required for an ARM compiler workaround
mapArgs["-ac_halving"] = halving; // allow testing easily with different values here
}
else

19
src/main.cpp

@ -1760,7 +1760,7 @@ bool AcceptToMemoryPoolInt(CTxMemPool& pool, CValidationState &state, const CTra
int flag=0, nextBlockHeight = simHeight ? simHeight : chainActive.Height() + 1;
auto consensusBranchId = CurrentEpochBranchId(nextBlockHeight, Params().GetConsensus());
auto chainParams = Params();
// Node operator can choose to reject tx by number of transparent inputs
static_assert(std::numeric_limits<size_t>::max() >= std::numeric_limits<int64_t>::max(), "size_t too small");
size_t limit = (size_t) GetArg("-mempooltxinputlimit", 0);
@ -1775,6 +1775,12 @@ bool AcceptToMemoryPoolInt(CTxMemPool& pool, CValidationState &state, const CTra
}
}
bool isVerusVault = CVerusSolutionVector::GetVersionByHeight(nextBlockHeight) >= CActivationHeight::ACTIVATE_VERUSVAULT;
if (isVerusVault && tx.IsCoinBase())
{
return error("AcceptToMemoryPool: Coinbase");
}
auto verifier = libzcash::ProofVerifier::Strict();
if ( komodo_validate_interest(tx,chainActive.LastTip()->GetHeight()+1,chainActive.LastTip()->GetMedianTimePast() + 777,0) < 0 )
{
@ -5802,7 +5808,7 @@ bool CheckBlock(int32_t *futureblockp,int32_t height,CBlockIndex *pindex,const C
}
}
if ( myAddtomempool(Tx, &state, height, &missinginputs) == false ) // happens with out of order tx in block on resync
if (!tx.IsCoinBase() && myAddtomempool(Tx, &state, height, &missinginputs) == false ) // happens with out of order tx in block on resync
{
//LogPrintf("%s: Rejected by mempool, reason: .%s.\n", __func__, state.GetRejectReason().c_str());
//printf("%s: Rejected by mempool, reason: .%s.\n", __func__, state.GetRejectReason().c_str());
@ -8277,15 +8283,17 @@ bool static ProcessMessage(CNode* pfrom, string strCommand, CDataStream& vRecv,
pfrom->AddInventoryKnown(inv);
LOCK(cs_main);
bool fMissingInputs = false;
CValidationState state;
pfrom->setAskFor.erase(inv.hash);
mapAlreadyAskedFor.erase(inv);
bool isCoinBase = tx.IsCoinBase();
// coinbases would be accepted to the mem pool for instant spend transactions, stop them here
if (!AlreadyHave(inv) && AcceptToMemoryPool(mempool, state, tx, true, &fMissingInputs))
if (!isCoinBase && !AlreadyHave(inv) && AcceptToMemoryPool(mempool, state, tx, true, &fMissingInputs))
{
mempool.check(pcoinsTip);
RelayTransaction(tx);
@ -8351,7 +8359,8 @@ bool static ProcessMessage(CNode* pfrom, string strCommand, CDataStream& vRecv,
EraseOrphanTx(hash);
}
// TODO: currently, prohibit joinsplits and shielded spends/outputs from entering mapOrphans
else if (fMissingInputs &&
else if (!isCoinBase &&
fMissingInputs &&
tx.vJoinSplit.empty() &&
tx.vShieldedSpend.empty() &&
tx.vShieldedOutput.empty())

Loading…
Cancel
Save