-
Notifications
You must be signed in to change notification settings - Fork 12
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 #108 from HorizenOfficial/pc/version_1_4_fork_pregobi
Version 1.4 fork on pregobi
- Loading branch information
Showing
6 changed files
with
104 additions
and
23 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
package io.horizen.eon.forks; | ||
|
||
import io.horizen.account.fork.Version1_3_0Fork; | ||
import io.horizen.account.fork.Version1_4_0Fork; | ||
import io.horizen.fork.OptionalSidechainFork; | ||
import io.horizen.fork.SidechainForkConsensusEpoch; | ||
import io.horizen.utils.Pair; | ||
|
||
import java.util.List; | ||
import java.util.Optional; | ||
|
||
/** | ||
* EON fork 6 (introduced in Version 1.4.0) | ||
* New on-chain delegated staking reward mechanism, new handling of rewards from mainchain | ||
*/ | ||
public class F6Fork extends EONFork { | ||
public F6Fork(Optional<String> sidechainId) { | ||
super(sidechainId); | ||
} | ||
|
||
@Override | ||
protected int getActivationRegtest() { | ||
return 7; | ||
} | ||
@Override | ||
protected int getActivationTestnetPregobi() {return 2180;} //estimated start at TUE 21 May 2024 16:31 Milano time | ||
|
||
@Override | ||
protected int getActivationTestnetGobi() { | ||
return 10000000; //TBD | ||
} | ||
@Override | ||
protected int getActivationTestnet() { return 2180; //not used | ||
} | ||
@Override | ||
protected int getActivationMainnet() { | ||
return 10000000; //TBD | ||
} | ||
|
||
@Override | ||
public List<Pair<SidechainForkConsensusEpoch, OptionalSidechainFork>> getPairs() { | ||
return List.of( | ||
new Pair<>( | ||
new SidechainForkConsensusEpoch( | ||
getActivationRegtest(), | ||
getActivationTestnet(sidechainId), | ||
getActivationMainnet()), | ||
new Version1_4_0Fork(true) | ||
) | ||
); | ||
} | ||
} |