mirror of
https://codeberg.org/anoncontributorxmr/monero.git
synced 2024-11-23 19:33:28 +01:00
hardfork: add a default fork entry for v1 if none exist
To avoid special cases
This commit is contained in:
parent
c7f82ec769
commit
759383c52d
@ -155,6 +155,11 @@ bool HardFork::add(const cryptonote::block &block, uint64_t height)
|
|||||||
void HardFork::init()
|
void HardFork::init()
|
||||||
{
|
{
|
||||||
CRITICAL_REGION_LOCAL(lock);
|
CRITICAL_REGION_LOCAL(lock);
|
||||||
|
|
||||||
|
// add a placeholder for the default version, to avoid special cases
|
||||||
|
if (heights.empty())
|
||||||
|
heights.push_back(Params(original_version, 0, 0, 0));
|
||||||
|
|
||||||
versions.clear();
|
versions.clear();
|
||||||
for (size_t n = 0; n < 256; ++n)
|
for (size_t n = 0; n < 256; ++n)
|
||||||
last_versions[n] = 0;
|
last_versions[n] = 0;
|
||||||
|
Loading…
Reference in New Issue
Block a user