-
Notifications
You must be signed in to change notification settings - Fork 33
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
separate feature flag definitions from evaluation
- Loading branch information
1 parent
8c7fc88
commit b5158ab
Showing
7 changed files
with
42 additions
and
44 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
22 changes: 22 additions & 0 deletions
22
framework/libra-framework/sources/ol_sources/config/ol_features.move
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,22 @@ | ||
|
||
module ol_framework::ol_features_constants { | ||
use std::features; | ||
/// Whether the new epoch trigger logic is enabled. | ||
/// Lifetime: transient | ||
const EPOCH_TRIGGER_ENABLED: u64 = 24; | ||
public fun get_epoch_trigger(): u64 { EPOCH_TRIGGER_ENABLED } | ||
public fun epoch_trigger_enabled(): bool { | ||
features::is_enabled(EPOCH_TRIGGER_ENABLED) | ||
} | ||
|
||
|
||
//////// TEST HELPERS //////// | ||
#[test_only] | ||
const TEST_DUMMY_FLAG: u64 = 8675309; | ||
#[test_only] | ||
public fun test_get_dummy_flag(): u64 { TEST_DUMMY_FLAG } | ||
#[test_only] | ||
public fun test_dummy_flag_enabled(): bool { | ||
features::is_enabled(TEST_DUMMY_FLAG) | ||
} | ||
} |
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