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

@@ -1127,6 +1127,15 @@ pub fn main() {
.help("A snapshot hash must be published in gossip by this validator to be accepted. \
May be specified multiple times. If unspecified any snapshot hash will be accepted"),
)
.arg(
Arg::with_name("debug_key")
.long("debug-key")
.validator(is_pubkey)
.value_name("PUBKEY")
.multiple(true)
.takes_value(true)
.help("Log when transactions are processed which reference a given key."),
)
.arg(
Arg::with_name("no_untrusted_rpc")
.long("no-untrusted-rpc")
@@ -1263,6 +1272,16 @@ pub fn main() {
exit(1);
});
let debug_keys: Option<Arc<HashSet<_>>> = if matches.is_present("debug_key") {
Some(Arc::new(
values_t_or_exit!(matches, "debug_key", Pubkey)
.into_iter()
.collect(),
))
} else {
None
};
let trusted_validators = validators_set(
&identity_keypair.pubkey(),
&matches,
@@ -1337,6 +1356,7 @@ pub fn main() {
no_rocksdb_compaction,
wal_recovery_mode,
poh_verify: !matches.is_present("skip_poh_verify"),
debug_keys,
..ValidatorConfig::default()
};