-
Notifications
You must be signed in to change notification settings - Fork 41
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'v3.18.0' into bug/1640-change-snapshot-hash-computation
- Loading branch information
Showing
23 changed files
with
388 additions
and
172 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
#include "CorrectForkInPowPatch.h" | ||
|
||
time_t CorrectForkInPowPatch::activationTimestamp; | ||
time_t CorrectForkInPowPatch::lastBlockTimestamp; | ||
unsigned CorrectForkInPowPatch::lastBlockNumber; | ||
|
||
bool CorrectForkInPowPatch::isEnabled() { | ||
if ( activationTimestamp == 0 ) { | ||
return false; | ||
} | ||
return activationTimestamp <= lastBlockTimestamp; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
#ifndef CORRECTFORKINPOWPATCH_H | ||
#define CORRECTFORKINPOWPATCH_H | ||
|
||
#include <libethereum/SchainPatch.h> | ||
|
||
#include <time.h> | ||
|
||
namespace dev { | ||
namespace eth { | ||
class Client; | ||
} | ||
namespace test { | ||
class TestBlockChain; | ||
class TestOutputHelperFixture; | ||
} // namespace test | ||
} // namespace dev | ||
|
||
/* | ||
* Context: use current, and not Constantinople, fork in Transaction::checkOutExternalGas() | ||
*/ | ||
class CorrectForkInPowPatch : public SchainPatch { | ||
public: | ||
static bool isEnabled(); | ||
|
||
static void setTimestamp( time_t _timeStamp ) { | ||
printInfo( __FILE__, _timeStamp ); | ||
activationTimestamp = _timeStamp; | ||
} | ||
|
||
static unsigned getLastBlockNumber() { return lastBlockNumber; } | ||
|
||
private: | ||
friend class dev::eth::Client; | ||
friend class dev::test::TestBlockChain; | ||
friend class dev::test::TestOutputHelperFixture; | ||
static time_t activationTimestamp; | ||
static time_t lastBlockTimestamp; | ||
static unsigned lastBlockNumber; | ||
}; | ||
|
||
#endif // CORRECTFORKINPOWPATCH_H |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.