cfxcore/pos/consensus/util/
config_subscription.rs1use channel::diem_channel::Receiver;
9use diem_types::on_chain_config::{
10 new_epoch_event_key, OnChainConfigPayload, ON_CHAIN_CONFIG_REGISTRY,
11};
12use subscription_service::ReconfigSubscription;
13
14pub fn gen_consensus_reconfig_subscription(
17) -> (ReconfigSubscription, Receiver<(), OnChainConfigPayload>) {
18 ReconfigSubscription::subscribe_all(
19 "consensus",
20 ON_CHAIN_CONFIG_REGISTRY.to_vec(),
21 vec![new_epoch_event_key()],
22 )
23}