diff --git a/node/service.go b/node/service.go index 55062a5004..d8ca95a372 100644 --- a/node/service.go +++ b/node/service.go @@ -17,6 +17,7 @@ package node import ( + "crypto/ecdsa" "reflect" "github.com/ethereum/go-ethereum/accounts" @@ -67,6 +68,11 @@ func (ctx *ServiceContext) Service(service interface{}) error { return ErrServiceUnknown } +// NodeKey returns node key from config +func (ctx *ServiceContext) NodeKey() *ecdsa.PrivateKey { + return ctx.config.NodeKey() +} + // ServiceConstructor is the function signature of the constructors needed to be // registered for service instantiation. type ServiceConstructor func(ctx *ServiceContext) (Service, error)