From 67c49cf1c364639681a2095d87b15591dec4cb42 Mon Sep 17 00:00:00 2001 From: Alex Sharov Date: Thu, 25 Nov 2021 00:15:14 +0700 Subject: [PATCH] Pool: support multi sentry (#3030) * save * save * save * save * save * save * save * save --- cmd/sentry/download/sentry.go | 3 +-- go.mod | 2 +- go.sum | 5 ++--- 3 files changed, 4 insertions(+), 6 deletions(-) diff --git a/cmd/sentry/download/sentry.go b/cmd/sentry/download/sentry.go index 33a98841d..77b05872e 100644 --- a/cmd/sentry/download/sentry.go +++ b/cmd/sentry/download/sentry.go @@ -10,7 +10,6 @@ import ( "net" "os" "os/signal" - "path" "sort" "sync" "sync/atomic" @@ -545,7 +544,7 @@ func NewSentryServer(ctx context.Context, dialCandidates enode.Iterator, readNod // Sentry creates and runs standalone sentry func Sentry(datadir string, sentryAddr string, discoveryDNS []string, cfg *p2p.Config, protocolVersion uint) error { - if err := os.MkdirAll(path.Join(datadir, "erigon"), 0744); err != nil { + if err := os.MkdirAll(datadir, 0744); err != nil { return fmt.Errorf("could not create dir: %s, %w", datadir, err) } ctx := rootContext() diff --git a/go.mod b/go.mod index 3a3997f55..b74ac9604 100644 --- a/go.mod +++ b/go.mod @@ -35,7 +35,7 @@ require ( github.com/json-iterator/go v1.1.12 github.com/julienschmidt/httprouter v1.3.0 github.com/kevinburke/go-bindata v3.21.0+incompatible - github.com/ledgerwatch/erigon-lib v0.0.0-20211121193559-d8870b19c307 + github.com/ledgerwatch/erigon-lib v0.0.0-20211124065323-9b501d57799a github.com/ledgerwatch/log/v3 v3.4.0 github.com/ledgerwatch/secp256k1 v1.0.0 github.com/logrusorgru/aurora/v3 v3.0.0 diff --git a/go.sum b/go.sum index c8c4af5d8..3964b2226 100644 --- a/go.sum +++ b/go.sum @@ -596,8 +596,8 @@ github.com/kylelemons/godebug v0.0.0-20170224010052-a616ab194758 h1:0D5M2HQSGD3P github.com/kylelemons/godebug v0.0.0-20170224010052-a616ab194758/go.mod h1:B69LEHPfb2qLo0BaaOLcbitczOKLWTsrBG9LczfCD4k= github.com/leanovate/gopter v0.2.9 h1:fQjYxZaynp97ozCzfOyOuAGOU4aU/z37zf/tOujFk7c= github.com/leanovate/gopter v0.2.9/go.mod h1:U2L/78B+KVFIx2VmW6onHJQzXtFb+p5y3y2Sh+Jxxv8= -github.com/ledgerwatch/erigon-lib v0.0.0-20211121193559-d8870b19c307 h1:qR/7ZpY455sHnU73BXOUWx5zMEbNrdiqDA/i53Hya+8= -github.com/ledgerwatch/erigon-lib v0.0.0-20211121193559-d8870b19c307/go.mod h1:CuEZROm43MykZT5CjCj02jw0FOwaDl8Nh+PZkTEGopg= +github.com/ledgerwatch/erigon-lib v0.0.0-20211124065323-9b501d57799a h1:dml/Mwe0ReKdFy2rSu0OJ6KNFMOfXKMZUKU67dc5xuQ= +github.com/ledgerwatch/erigon-lib v0.0.0-20211124065323-9b501d57799a/go.mod h1:lyGP3i0x4CeabdKZ4beycD5xZfHWZwJsAX+70OfGj4Y= github.com/ledgerwatch/log/v3 v3.4.0 h1:SEIOcv5a2zkG3PmoT5jeTU9m/0nEUv0BJS5bzsjwKCI= github.com/ledgerwatch/log/v3 v3.4.0/go.mod h1:VXcz6Ssn6XEeU92dCMc39/g1F0OYAjw1Mt+dGP5DjXY= github.com/ledgerwatch/secp256k1 v1.0.0 h1:Usvz87YoTG0uePIV8woOof5cQnLXGYa162rFf3YnwaQ= @@ -931,7 +931,6 @@ github.com/tklauser/go-sysconf v0.3.9/go.mod h1:11DU/5sG7UexIrp/O6g35hrWzu0JxlwQ github.com/tklauser/numcpus v0.3.0 h1:ILuRUQBtssgnxw0XXIjKUC56fgnOrFoQQ/4+DeU2biQ= github.com/tklauser/numcpus v0.3.0/go.mod h1:yFGUr7TUHQRAhyqBcEg0Ge34zDBAsIvJJcyE6boqnA8= github.com/tmc/grpc-websocket-proxy v0.0.0-20170815181823-89b8d40f7ca8/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= -github.com/torquem-ch/mdbx-go v0.22.1/go.mod h1:T2fsoJDVppxfAPTLd1svUgH1kpPmeXdPESmroSHcL1E= github.com/torquem-ch/mdbx-go v0.22.2 h1:wl/eJaZeKqsqObfzXAurYuPozr4hkopJ1hELHXH+N8w= github.com/torquem-ch/mdbx-go v0.22.2/go.mod h1:T2fsoJDVppxfAPTLd1svUgH1kpPmeXdPESmroSHcL1E= github.com/ttacon/chalk v0.0.0-20160626202418-22c06c80ed31/go.mod h1:onvgF043R+lC5RZ8IT9rBXDaEDnpnw/Cl+HFiw+v/7Q=