aboutsummaryrefslogtreecommitdiffstats
path: root/node/node.go
diff options
context:
space:
mode:
authorSteve Ruckdashel <steve.ruckdashel@gmail.com>2019-04-04 21:59:18 +0800
committerPéter Szilágyi <peterke@gmail.com>2019-04-04 21:59:18 +0800
commita8dd1f93c6af6ef3fb52482584b3a8691269ea02 (patch)
treeeae00415dfbec0772b65fe78ac8d328637d615b0 /node/node.go
parentd5cae48bae81cd6072255150162b26a3653f176e (diff)
downloadgo-tangerine-a8dd1f93c6af6ef3fb52482584b3a8691269ea02.tar
go-tangerine-a8dd1f93c6af6ef3fb52482584b3a8691269ea02.tar.gz
go-tangerine-a8dd1f93c6af6ef3fb52482584b3a8691269ea02.tar.bz2
go-tangerine-a8dd1f93c6af6ef3fb52482584b3a8691269ea02.tar.lz
go-tangerine-a8dd1f93c6af6ef3fb52482584b3a8691269ea02.tar.xz
go-tangerine-a8dd1f93c6af6ef3fb52482584b3a8691269ea02.tar.zst
go-tangerine-a8dd1f93c6af6ef3fb52482584b3a8691269ea02.zip
node: switching prometheus flock location to tsdb (#19376)
* node: switching prometheus flock location to tsdb * rookie mistake
Diffstat (limited to 'node/node.go')
-rw-r--r--node/node.go8
1 files changed, 4 insertions, 4 deletions
diff --git a/node/node.go b/node/node.go
index f4c7d8c72..ff2244503 100644
--- a/node/node.go
+++ b/node/node.go
@@ -34,7 +34,7 @@ import (
"github.com/ethereum/go-ethereum/log"
"github.com/ethereum/go-ethereum/p2p"
"github.com/ethereum/go-ethereum/rpc"
- "github.com/prometheus/prometheus/util/flock"
+ "github.com/prometheus/tsdb/fileutil"
)
// Node is a container on which services can be registered.
@@ -43,8 +43,8 @@ type Node struct {
config *Config
accman *accounts.Manager
- ephemeralKeystore string // if non-empty, the key directory that will be removed by Stop
- instanceDirLock flock.Releaser // prevents concurrent use of instance directory
+ ephemeralKeystore string // if non-empty, the key directory that will be removed by Stop
+ instanceDirLock fileutil.Releaser // prevents concurrent use of instance directory
serverConfig p2p.Config
server *p2p.Server // Currently running P2P networking layer
@@ -267,7 +267,7 @@ func (n *Node) openDataDir() error {
}
// Lock the instance directory to prevent concurrent use by another instance as well as
// accidental use of the instance directory as a database.
- release, _, err := flock.New(filepath.Join(instdir, "LOCK"))
+ release, _, err := fileutil.Flock(filepath.Join(instdir, "LOCK"))
if err != nil {
return convertFileLockError(err)
}