diff options
author | Péter Szilágyi <peterke@gmail.com> | 2017-03-06 17:37:32 +0800 |
---|---|---|
committer | Felix Lange <fjl@users.noreply.github.com> | 2017-03-09 22:50:14 +0800 |
commit | 023670f6bafcfed28c01857da215217a5dadfaa1 (patch) | |
tree | 2ced9d0178bfd8d101356a64522cf0225f98362e /node/service.go | |
parent | 567d41d9363706b4b13ce0903804e8acf214af49 (diff) | |
download | go-tangerine-023670f6bafcfed28c01857da215217a5dadfaa1.tar.gz go-tangerine-023670f6bafcfed28c01857da215217a5dadfaa1.tar.zst go-tangerine-023670f6bafcfed28c01857da215217a5dadfaa1.zip |
cmd, eth, les, node, pow: disk caching and progress reports
Diffstat (limited to 'node/service.go')
-rw-r--r-- | node/service.go | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/node/service.go b/node/service.go index 1cd1fe808..5e1eb0e64 100644 --- a/node/service.go +++ b/node/service.go @@ -46,6 +46,13 @@ func (ctx *ServiceContext) OpenDatabase(name string, cache int, handles int) (et return ethdb.NewLDBDatabase(ctx.config.resolvePath(name), cache, handles) } +// ResolvePath resolves a user path into the data directory if that was relative +// and if the user actually uses persistent storage. It will return an empty string +// for emphemeral storage and the user's own input for absolute paths. +func (ctx *ServiceContext) ResolvePath(path string) string { + return ctx.config.resolvePath(path) +} + // Service retrieves a currently running service registered of a specific type. func (ctx *ServiceContext) Service(service interface{}) error { element := reflect.ValueOf(service).Elem() |