tx wide compute budget (#18631)

This commit is contained in:
Jack May
2021-07-16 00:31:22 -07:00
committed by GitHub
parent d166b9856a
commit 6cf3c1ab8f
15 changed files with 421 additions and 65 deletions

View File

@ -0,0 +1,20 @@
[package]
name = "solana-compute-budget-program"
description = "Solana Compute Budget program"
version = "1.8.0"
homepage = "https://solana.com/"
documentation = "https://docs.rs/solana-compute-budget-program"
repository = "https://github.com/solana-labs/solana"
authors = ["Solana Maintainers <maintainers@solana.foundation>"]
license = "Apache-2.0"
edition = "2018"
[dependencies]
solana-sdk = { path = "../../sdk", version = "=1.8.0" }
[lib]
crate-type = ["lib"]
name = "solana_compute_budget_program"
[package.metadata.docs.rs]
targets = ["x86_64-unknown-linux-gnu"]

View File

@ -0,0 +1,12 @@
use solana_sdk::{
instruction::InstructionError, process_instruction::InvokeContext, pubkey::Pubkey,
};
pub fn process_instruction(
_program_id: &Pubkey,
_data: &[u8],
_invoke_context: &mut dyn InvokeContext,
) -> Result<(), InstructionError> {
// Do nothing, compute budget instructions handled by the runtime
Ok(())
}