Skip to content
This repository has been archived by the owner on Oct 28, 2021. It is now read-only.

Commit

Permalink
Fix using several ChainParams instances in one program
Browse files Browse the repository at this point in the history
  • Loading branch information
gumb0 committed Oct 28, 2019
1 parent 8d9a9a0 commit 980b658
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
4 changes: 1 addition & 3 deletions libethcore/ChainOperationParams.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
#include "ChainOperationParams.h"
#include <libdevcore/CommonData.h>
#include <libdevcore/Log.h>
#include <libethcore/EVMSchedule.h>

using namespace std;
using namespace dev;
Expand Down Expand Up @@ -43,8 +42,7 @@ EVMSchedule const& ChainOperationParams::scheduleForBlockNumber(u256 const& _blo
if (_blockNumber < lastForkBlock)
return fixedForkSchedule;

static EVMSchedule const lastForkWithAdditionalEIPsSchedule =
addEIPs(fixedForkSchedule, lastForkAdditionalEIPs);
lastForkWithAdditionalEIPsSchedule = addEIPs(fixedForkSchedule, lastForkAdditionalEIPs);
return lastForkWithAdditionalEIPsSchedule;
}

Expand Down
3 changes: 3 additions & 0 deletions libethcore/ChainOperationParams.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
#pragma once

#include <libdevcore/Common.h>
#include <libethcore/EVMSchedule.h>
#include <libethcore/Precompiled.h>

#include "Common.h"
Expand Down Expand Up @@ -117,6 +118,8 @@ struct ChainOperationParams

/// Precompiled contracts as specified in the chain params.
std::unordered_map<Address, PrecompiledContract> precompiled;

mutable EVMSchedule lastForkWithAdditionalEIPsSchedule;
};

}
Expand Down

0 comments on commit 980b658

Please sign in to comment.