forked from solana-labs/solana
-
Notifications
You must be signed in to change notification settings - Fork 259
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
1 parent
9eb67db
commit 4a82ff1
Showing
3 changed files
with
81 additions
and
2 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,23 @@ | ||
//! Configurations for handling cost modeling of builtin programs. | ||
use solana_pubkey::Pubkey; | ||
|
||
/// Configuration for cost modeling of a builtin program. | ||
#[derive(Debug)] | ||
pub struct CostModelingConfig { | ||
/// The default cost of the builtin program. | ||
/// If None, this builtin program is not cost modeled. | ||
pub default_cost: Option<u64>, | ||
/// Configuration for updating the cost of the builtin program. | ||
/// If None, the cost is never updated. | ||
pub new_cost_config: Option<NewCostModelingConfig>, | ||
} | ||
|
||
/// Configuration for updating the cost of a builtin program. | ||
#[derive(Debug)] | ||
pub struct NewCostModelingConfig { | ||
/// The new cost of the builtin program. | ||
pub new_cost: u64, | ||
/// The feature gate to trigger the new cost. | ||
pub feature_id: Pubkey, | ||
} |
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