Merge remote-tracking branch 'origin/develop' into feature/old-consensus-engine

This commit is contained in:
philip-morlier 2023-06-14 22:24:35 -07:00
commit b19d7f9f9e

View File

@ -72,12 +72,12 @@ func NewPluginLoader(target string) (*PluginLoader, error) {
for _, file := range files { for _, file := range files {
fpath := path.Join(target, file.Name()) fpath := path.Join(target, file.Name())
if !strings.HasSuffix(file.Name(), ".so") { if !strings.HasSuffix(file.Name(), ".so") {
log.Debug("File inplugin directory is not '.so' file. Skipping.", "file", fpath) log.Debug("File in plugin directory is not '.so' file. Skipping.", "file", fpath)
continue continue
} }
plug, err := plugin.Open(fpath) plug, err := plugin.Open(fpath)
if err != nil { if err != nil {
log.Warn("File in plugin directory could not be loaded: %v", "file", fpath, "error", err.Error()) log.Warn("File in plugin directory could not be loaded", "file", fpath, "error", err)
continue continue
} }
// Any type of plugin can potentially specify flags // Any type of plugin can potentially specify flags