Add RPC notify and banking keys debug (bp #12396) (#12452)

* Add RPC notify and banking keys debug (#12396)

(cherry picked from commit 68e5a2ef56)

# Conflicts:
#	core/src/validator.rs

* Rebase

Co-authored-by: sakridge <sakridge@gmail.com>
Co-authored-by: Michael Vines <mvines@gmail.com>
This commit is contained in:
mergify[bot]
2020-09-25 21:05:21 +00:00
committed by GitHub
parent b65a764593
commit e85c792f70
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

@@ -39,7 +39,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,
@@ -317,6 +317,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) {
@@ -347,6 +348,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...");
@@ -2856,7 +2858,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()
}