diff --git a/api/service/manager.go b/api/service/manager.go index 6e9f81fa4..fc5834888 100644 --- a/api/service/manager.go +++ b/api/service/manager.go @@ -27,6 +27,7 @@ const ( Consensus BlockProposal PeerDiscovery + Staking Test Done ) @@ -45,6 +46,8 @@ func (t Type) String() string { return "BlockProposal" case PeerDiscovery: return "PeerDiscovery" + case Staking: + return "Staking" case Test: return "Test" case Done: diff --git a/api/service/staking/service.go b/api/service/staking/service.go new file mode 100644 index 000000000..bd9349f4d --- /dev/null +++ b/api/service/staking/service.go @@ -0,0 +1,25 @@ +package staking + +import ( + "github.com/harmony-one/harmony/internal/utils" + "github.com/harmony-one/harmony/p2p" +) + +// Service is the struct for staking service. +type Service struct { + Host p2p.Host +} + +//StartService starts the staking service. +func (s *Service) StartService() { + utils.GetLogInstance().Info("Starting staking service.") +} + +func (s *Service) createStakingTransaction() { + //creates staking transaction. +} + +// StopService shutdowns staking service. +func (s *Service) StopService() { + utils.GetLogInstance().Info("Shutting down staking service.") +}