forked from Qitmeer/qng
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
43 additions
and
10 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
package forks | ||
|
||
import ( | ||
"github.com/Qitmeer/qng/core/protocol" | ||
"github.com/Qitmeer/qng/params" | ||
"github.com/ethereum/go-ethereum/common" | ||
"math" | ||
"math/big" | ||
) | ||
|
||
const ( | ||
// TODO:Future decision on whether to start | ||
// Support cancun height | ||
CancunForkEvmHeight = math.MaxInt64 | ||
) | ||
|
||
func IsCancunForkHeight(height int64) bool { | ||
if params.ActiveNetParams.Net == protocol.PrivNet { | ||
return true | ||
} | ||
return height >= CancunForkEvmHeight | ||
} | ||
|
||
func GetCancunForkDifficulty(height int64) *big.Int { | ||
if IsCancunForkHeight(height) { | ||
return common.Big0 | ||
} | ||
return common.Big1 | ||
} |
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