Files
solana/src/bpf_loader.rs
Rob Walker 1fbf1d2cf2 Add checkpoint, rollback to to bank (#1662)
add linked-list capability to accounts

change accounts from a linked list to a VecDeque

add checkpoint and rollback for lastids

add subscriber notifications for rollbacks

checkpoint transaction count, too
2018-11-05 09:47:41 -08:00

25 lines
597 B
Rust

//! BPF loader
use native_loader;
use solana_sdk::account::Account;
use solana_sdk::pubkey::Pubkey;
const BPF_LOADER_NAME: &str = "solana_bpf_loader";
const BPF_LOADER_PROGRAM_ID: [u8; 32] = [
128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0,
];
pub fn id() -> Pubkey {
Pubkey::new(&BPF_LOADER_PROGRAM_ID)
}
pub fn account() -> Account {
Account {
tokens: 0,
program_id: id(),
userdata: BPF_LOADER_NAME.as_bytes().to_vec(),
executable: true,
loader_program_id: native_loader::id(),
}
}