Add public seed nodes and ignore version-rolling bits
This commit is contained in:
parent
97b6b84483
commit
e0458056fd
2 changed files with 14 additions and 6 deletions
|
|
@ -128,7 +128,9 @@ public:
|
|||
assert(consensus.hashGenesisBlock == uint256S("0x0000027626959d894ae1c8a6f9050cdcbdf58eb0037ab06345cb5502955370f1"));
|
||||
assert(genesis.hashMerkleRoot == uint256S("0x3c1f602428f06c9baf0961930a5f711a2b5fd6157a9922365e7f1eca1970ff16"));
|
||||
|
||||
// DNS seeds will be added after the first public Vexta seed nodes are deployed.
|
||||
// Public Vexta mainnet seed nodes.
|
||||
vSeeds.emplace_back("87.106.99.23"); // UK seed
|
||||
vSeeds.emplace_back("74.208.53.160"); // US seed
|
||||
|
||||
base58Prefixes[PUBKEY_ADDRESS] = std::vector<unsigned char>(1,70);
|
||||
base58Prefixes[SCRIPT_ADDRESS_OLD] = std::vector<unsigned char>(1,85);
|
||||
|
|
|
|||
|
|
@ -2257,15 +2257,21 @@ void CChainState::UpdateTip(const CBlockIndex* pindexNew)
|
|||
}
|
||||
}
|
||||
|
||||
// Check the version of the last 100 blocks to see if we need to upgrade:
|
||||
// Check the version of the last 100 blocks to see if we need to upgrade.
|
||||
// Ignore bits reserved for BIP310 version rolling / overt ASICBoost.
|
||||
static constexpr uint32_t VERSION_ROLLING_MASK = 0x1fffe000;
|
||||
|
||||
for (int i = 0; i < 100 && pindex != nullptr; i++)
|
||||
{
|
||||
int32_t nExpectedVersion = g_versionbitscache.ComputeBlockVersion(pindex->pprev, m_params.GetConsensus());
|
||||
if (pindex->nVersion > VERSIONBITS_LAST_OLD_BLOCK_VERSION && (pindex->nVersion & ~nExpectedVersion) != 0)
|
||||
const int32_t nExpectedVersion = g_versionbitscache.ComputeBlockVersion(pindex->pprev, m_params.GetConsensus());
|
||||
const uint32_t unexpectedBits =
|
||||
(static_cast<uint32_t>(pindex->nVersion) &
|
||||
~static_cast<uint32_t>(nExpectedVersion)) &
|
||||
~VERSION_ROLLING_MASK;
|
||||
|
||||
if (pindex->nVersion > VERSIONBITS_LAST_OLD_BLOCK_VERSION && unexpectedBits != 0)
|
||||
{
|
||||
++nUpgraded;
|
||||
// SHA256D blocks with weird versions could simply be the result
|
||||
// of overt AsicBoost.
|
||||
}
|
||||
pindex = pindex->pprev;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue