-
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 'bug/IS-902-allow-uploading-only-one-snapshot' of github…
….com:skalenetwork/skaled into bug/IS-902-allow-uploading-only-one-snapshot
- Loading branch information
Showing
27 changed files
with
270 additions
and
141 deletions.
There are no files selected for viewing
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
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 |
Oops, something went wrong.