make runtime depend on bpf_loader (#4601)
* make runtime depend on bpf_loader * remove vote redundancy, move bpf_loader to genesis, export program\! from bpf_loader crate * move bpf_loader specification into genesis * bpf tests to use genesis with bpf * need to avoid depending on programs, except for macros
This commit is contained in:
@ -1,23 +0,0 @@
|
||||
use crate::solana_storage_program;
|
||||
use solana_sdk::genesis_block::GenesisBlock;
|
||||
use solana_sdk::pubkey::Pubkey;
|
||||
use solana_storage_api::storage_contract;
|
||||
|
||||
pub trait GenesisBlockUtil {
|
||||
fn add_storage_program(&mut self, validator_pubkey: &Pubkey, validator_storage_pubkey: &Pubkey);
|
||||
}
|
||||
|
||||
impl GenesisBlockUtil for GenesisBlock {
|
||||
fn add_storage_program(
|
||||
&mut self,
|
||||
validator_pubkey: &Pubkey,
|
||||
validator_storage_pubkey: &Pubkey,
|
||||
) {
|
||||
self.accounts.push((
|
||||
*validator_storage_pubkey,
|
||||
storage_contract::create_validator_storage_account(*validator_pubkey, 1),
|
||||
));
|
||||
self.native_instruction_processors
|
||||
.push(solana_storage_program!());
|
||||
}
|
||||
}
|
@ -1,5 +1,3 @@
|
||||
pub mod genesis_block_util;
|
||||
|
||||
#[macro_export]
|
||||
macro_rules! solana_storage_program {
|
||||
() => {
|
||||
|
Reference in New Issue
Block a user