-
Notifications
You must be signed in to change notification settings - Fork 8
Open
Description
commit e08b37a introduced RequestUnitsDeprecated
but it got removed in v1.18, so the solana-* = "1.17" in Cargo.toml should be solana-* = "~1.17" to restrict solana-* version to avoid compiler errors like the title above since solana-devtools no longer compatible with >=1.18 versions.
diff --git a/sdk/src/compute_budget.rs b/sdk/src/compute_budget.rs
index 84d0c37660..c903be13c2 100644
--- a/sdk/src/compute_budget.rs
+++ b/sdk/src/compute_budget.rs
@@ -23,14 +23,7 @@ crate::declare_id!("ComputeBudget111111111111111111111111111111");
Serialize,
)]
pub enum ComputeBudgetInstruction {
- /// Deprecated
- // TODO: after feature remove_deprecated_request_unit_ix::id() is activated, replace it with 'unused'
- RequestUnitsDeprecated {
- /// Units to request
- units: u32,
- /// Additional fee to add
- additional_fee: u32,
- },
+ Unused, // deprecated variant, reserved value.
/// Request a specific transaction-wide program heap region size in bytes.
/// The value requested must be a multiple of 1024. This new heap region
/// size applies to each program executed in the transaction, including all
@@ -63,9 +56,9 @@ impl ComputeBudgetInstruction {
/// Serialize Instruction using borsh, this is only used in runtime::cost_model::tests but compilation
/// can't be restricted as it's used across packages
- // #[cfg(test)]
- pub fn pack(self) -> Result<Vec<u8>, std::io::Error> {
- self.try_to_vec()
+ #[cfg(feature = "dev-context-only-utils")]
+ pub fn pack(self) -> Result<Vec<u8>, borsh::io::Error> {
+ borsh::to_vec(&self)
}
Metadata
Metadata
Assignees
Labels
No labels