diff --git a/pkg/config/internal_service.go b/pkg/config/internal_service.go new file mode 100644 index 000000000..c8c49f11b --- /dev/null +++ b/pkg/config/internal_service.go @@ -0,0 +1,8 @@ +package config + +// InternalService stores configuration for internal services that don't have +// any network configuration, but use a wallet and can be enabled/disabled. +type InternalService struct { + Enabled bool `yaml:"Enabled"` + UnlockWallet Wallet `yaml:"UnlockWallet"` +} diff --git a/pkg/config/notary_config.go b/pkg/config/notary_config.go index 791ed8f86..df4e51187 100644 --- a/pkg/config/notary_config.go +++ b/pkg/config/notary_config.go @@ -1,7 +1,4 @@ package config // P2PNotary stores configuration for Notary node service. -type P2PNotary struct { - Enabled bool `yaml:"Enabled"` - UnlockWallet Wallet `yaml:"UnlockWallet"` -} +type P2PNotary InternalService diff --git a/pkg/config/state_root.go b/pkg/config/state_root.go index 904c104fb..dd44f264d 100644 --- a/pkg/config/state_root.go +++ b/pkg/config/state_root.go @@ -1,7 +1,4 @@ package config // StateRoot contains state root service configuration. -type StateRoot struct { - Enabled bool `yaml:"Enabled"` - UnlockWallet Wallet `yaml:"UnlockWallet"` -} +type StateRoot InternalService