Add RPC notify and banking keys debug (#12396)

This commit is contained in:
sakridge
2020-09-23 18:46:42 -07:00
committed by GitHub
parent 7cab638297
commit 68e5a2ef56
11 changed files with 112 additions and 19 deletions

View File

@ -65,6 +65,7 @@ pub fn load(
&archive_filename,
compression,
genesis_config,
process_options.debug_keys.clone(),
)
.expect("Load from snapshot failed");

View File

@ -36,7 +36,7 @@ use solana_sdk::{
use solana_vote_program::vote_state::VoteState;
use std::{
cell::RefCell,
collections::HashMap,
collections::{HashMap, HashSet},
path::PathBuf,
result,
sync::Arc,
@ -311,6 +311,7 @@ pub struct ProcessOptions {
pub override_num_threads: Option<usize>,
pub new_hard_forks: Option<Vec<Slot>>,
pub frozen_accounts: Vec<Pubkey>,
pub debug_keys: Option<Arc<HashSet<Pubkey>>>,
}
fn initiate_callback(mut bank: &mut Arc<Bank>, genesis_config: &GenesisConfig) {
@ -341,6 +342,7 @@ pub fn process_blockstore(
&genesis_config,
account_paths,
&opts.frozen_accounts,
opts.debug_keys.clone(),
));
initiate_callback(&mut bank0, genesis_config);
info!("processing ledger for slot 0...");
@ -2846,7 +2848,7 @@ pub mod tests {
genesis_config: &GenesisConfig,
account_paths: Vec<PathBuf>,
) -> EpochSchedule {
let bank = Bank::new_with_paths(&genesis_config, account_paths, &[]);
let bank = Bank::new_with_paths(&genesis_config, account_paths, &[], None);
*bank.epoch_schedule()
}