* Make BPF Loader static (#11516)
(cherry picked from commit 7c736f71fe
)
# Conflicts:
# Cargo.lock
# core/Cargo.toml
# core/src/lib.rs
# core/src/validator.rs
# genesis-programs/src/lib.rs
# programs/bpf_loader/src/deprecated.rs
# programs/bpf_loader/src/lib.rs
# sdk/src/entrypoint_native.rs
# sdk/src/lib.rs
* resolve conflicts
Co-authored-by: Jack May <jack@solana.com>
This commit is contained in:
6
programs/bpf_loader/src/deprecated.rs
Normal file
6
programs/bpf_loader/src/deprecated.rs
Normal file
@@ -0,0 +1,6 @@
|
||||
solana_sdk::declare_builtin!(
|
||||
solana_sdk::bpf_loader_deprecated::ID,
|
||||
solana_bpf_loader_deprecated_program,
|
||||
solana_bpf_loader_program::process_instruction,
|
||||
deprecated::id
|
||||
);
|
@@ -25,10 +25,10 @@ use solana_sdk::{
|
||||
use std::{io::prelude::*, mem};
|
||||
use thiserror::Error;
|
||||
|
||||
solana_sdk::declare_loader!(
|
||||
solana_sdk::declare_builtin!(
|
||||
solana_sdk::bpf_loader::ID,
|
||||
solana_bpf_loader_program,
|
||||
process_instruction
|
||||
solana_bpf_loader_program::process_instruction
|
||||
);
|
||||
|
||||
#[derive(Error, Debug, Clone, PartialEq, FromPrimitive, ToPrimitive)]
|
||||
@@ -343,14 +343,6 @@ mod tests {
|
||||
}
|
||||
}
|
||||
|
||||
#[rustversion::since(1.46.0)]
|
||||
#[test]
|
||||
fn test_bpf_loader_same_crate() {
|
||||
// Ensure that we can invoke this macro from the same crate
|
||||
// where it is defined.
|
||||
solana_bpf_loader_program!();
|
||||
}
|
||||
|
||||
#[test]
|
||||
#[should_panic(expected = "ExceededMaxInstructions(10)")]
|
||||
fn test_bpf_loader_non_terminating_program() {
|
||||
|
Reference in New Issue
Block a user