Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 3 additions & 9 deletions geyser-plugin-manager/src/geyser_plugin_manager.rs
Original file line number Diff line number Diff line change
Expand Up @@ -60,12 +60,6 @@ pub struct GeyserPluginManager {
}

impl GeyserPluginManager {
pub fn new() -> Self {
GeyserPluginManager {
plugins: Vec::default(),
}
}

/// Unload all plugins and loaded plugin libraries, making sure to fire
/// their `on_plugin_unload()` methods so they can do any necessary cleanup.
pub fn unload(&mut self) {
Expand Down Expand Up @@ -497,7 +491,7 @@ mod tests {
#[test]
fn test_geyser_reload() {
// Initialize empty manager
let plugin_manager = Arc::new(RwLock::new(GeyserPluginManager::new()));
let plugin_manager = Arc::new(RwLock::new(GeyserPluginManager::default()));

// No plugins are loaded, this should fail
let mut plugin_manager_lock = plugin_manager.write().unwrap();
Expand Down Expand Up @@ -536,7 +530,7 @@ mod tests {
#[test]
fn test_plugin_list() {
// Initialize empty manager
let plugin_manager = Arc::new(RwLock::new(GeyserPluginManager::new()));
let plugin_manager = Arc::new(RwLock::new(GeyserPluginManager::default()));
let mut plugin_manager_lock = plugin_manager.write().unwrap();

// Load two plugins
Expand All @@ -558,7 +552,7 @@ mod tests {
#[test]
fn test_plugin_load_unload() {
// Initialize empty manager
let plugin_manager = Arc::new(RwLock::new(GeyserPluginManager::new()));
let plugin_manager = Arc::new(RwLock::new(GeyserPluginManager::default()));
let mut plugin_manager_lock = plugin_manager.write().unwrap();

// Load rpc call
Expand Down
2 changes: 1 addition & 1 deletion geyser-plugin-manager/src/geyser_plugin_service.rs
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ impl GeyserPluginService {
)>,
) -> Result<Self, GeyserPluginServiceError> {
info!("Starting GeyserPluginService from config files: {geyser_plugin_config_files:?}");
let mut plugin_manager = GeyserPluginManager::new();
let mut plugin_manager = GeyserPluginManager::default();

for geyser_plugin_config_file in geyser_plugin_config_files {
Self::load_plugin(&mut plugin_manager, geyser_plugin_config_file)?;
Expand Down
2 changes: 1 addition & 1 deletion test-validator/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ impl Default for TestValidatorGenesis {
log_messages_bytes_limit: Option::<usize>::default(),
transaction_account_lock_limit: Option::<usize>::default(),
tpu_enable_udp: DEFAULT_TPU_ENABLE_UDP,
geyser_plugin_manager: Arc::new(RwLock::new(GeyserPluginManager::new())),
geyser_plugin_manager: Arc::new(RwLock::new(GeyserPluginManager::default())),
admin_rpc_service_post_init:
Arc::<RwLock<Option<AdminRpcRequestMetadataPostInit>>>::default(),
}
Expand Down
Loading