-
Notifications
You must be signed in to change notification settings - Fork 247
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #179 from qianbin/reschedule-hotfix
FORK: reschedule the hotfix to block #1072000
- Loading branch information
Showing
9 changed files
with
91 additions
and
48 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
1.0.3 | ||
1.0.4 |
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 |
---|---|---|
@@ -1,13 +1,37 @@ | ||
package thor | ||
|
||
import ( | ||
"fmt" | ||
"math" | ||
) | ||
|
||
// ForkConfig config for a fork. | ||
type ForkConfig struct { | ||
BlockNumber uint32 | ||
FixTransferLog uint32 | ||
} | ||
|
||
// forks | ||
var ( | ||
FixTransferLogFork = ForkConfig{ | ||
BlockNumber: 1150000, | ||
} | ||
) | ||
func (fc ForkConfig) String() string { | ||
return fmt.Sprintf("FTRL: #%v", fc.FixTransferLog) | ||
} | ||
|
||
// NoFork a special config without any forks. | ||
var NoFork = ForkConfig{ | ||
FixTransferLog: math.MaxUint32, | ||
} | ||
|
||
// for well-known networks | ||
var forkConfigs = map[Bytes32]ForkConfig{ | ||
// mainnet | ||
MustParseBytes32("0x00000000851caf3cfdb6e899cf5958bfb1ac3413d346d43539627e6be7ec1b4a"): { | ||
FixTransferLog: 1072000, | ||
}, | ||
// testnet | ||
MustParseBytes32("0x000000000b2bce3c70bc649a02749e8687721b09ed2e15997f466536b20bb127"): { | ||
FixTransferLog: 1080000, | ||
}, | ||
} | ||
|
||
// GetForkConfig get fork config for given genesis ID. | ||
func GetForkConfig(genesisID Bytes32) ForkConfig { | ||
return forkConfigs[genesisID] | ||
} |