-
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.
[feature] create platform features module for seperation of vendor an…
…d platform features (#177) Co-authored-by: 0o-de-lally <[email protected]>
- Loading branch information
1 parent
aecfe93
commit 6c78b8e
Showing
19 changed files
with
5,040 additions
and
4,999 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
25 changes: 25 additions & 0 deletions
25
framework/libra-framework/sources/ol_sources/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,25 @@ | ||
|
||
// Vendor was silly and mixed the platform implementation's feature definitions | ||
// together with the feature flag module. | ||
// So we are moving it to the libra_framework:: module, outside of std:: | ||
|
||
module ol_framework::ol_features { | ||
use std::features; | ||
|
||
// Helper | ||
public fun change_feature_flags(framework: &signer, enable: vector<u64>, | ||
disable: vector<u64>) { | ||
features::change_feature_flags(framework, enable, disable); | ||
} | ||
|
||
// NOTE: OL features id begin numbering with 50 | ||
|
||
/// Whether the new epoch trigger logic is enabled. | ||
/// Lifetime: transient | ||
const EPOCH_TRIGGER_ENABLED: u64 = 50; | ||
public fun get_epoch_trigger(): u64 { EPOCH_TRIGGER_ENABLED } | ||
public fun epoch_trigger_enabled(): bool { | ||
features::is_enabled(EPOCH_TRIGGER_ENABLED) | ||
} | ||
|
||
} |
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
Binary file not shown.
Binary file modified
BIN
-171 Bytes
(99%)
framework/src/upgrade_fixtures/fixtures/upgrade-multi-lib/1-move-stdlib/script.mv
Binary file not shown.
2 changes: 1 addition & 1 deletion
2
framework/src/upgrade_fixtures/fixtures/upgrade-multi-lib/1-move-stdlib/script_sha3
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 @@ | ||
614568d14fabba0e8833d4bb974f57e6871b948ebd997082542afbd5b47c0bae | ||
cf51bda815dcf76e610e85586adb1119b456cdc647c367ac108934101e442552 |
Oops, something went wrong.