mirror of
https://github.com/OffchainLabs/prysm.git
synced 2026-01-09 21:38:05 -05:00
Block networking in sandbox test by default, fix roughtime panic (#3240)
* block networking in sandbox test by default, fix roughtime panic * Update .bazelrc
This commit is contained in:
@@ -7,6 +7,7 @@ go_library(
|
||||
visibility = ["//visibility:public"],
|
||||
deps = [
|
||||
"@com_github_cloudflare_roughtime//:go_default_library",
|
||||
"@com_github_sirupsen_logrus//:go_default_library",
|
||||
"@com_googlesource_roughtime_roughtime_git//go/config:go_default_library",
|
||||
],
|
||||
)
|
||||
|
||||
@@ -6,6 +6,7 @@ import (
|
||||
"time"
|
||||
|
||||
rt "github.com/cloudflare/roughtime"
|
||||
"github.com/sirupsen/logrus"
|
||||
"roughtime.googlesource.com/roughtime.git/go/config"
|
||||
)
|
||||
|
||||
@@ -22,6 +23,8 @@ func mustDecodeString(in string) []byte {
|
||||
return pk
|
||||
}
|
||||
|
||||
var log = logrus.WithField("prefix", "roughtime")
|
||||
|
||||
func init() {
|
||||
t0 := time.Now()
|
||||
|
||||
@@ -71,7 +74,7 @@ func init() {
|
||||
var err error
|
||||
offset, err = rt.AvgDeltaWithRadiusThresh(results, t0, 2*time.Second)
|
||||
if err != nil {
|
||||
panic(err)
|
||||
log.WithError(err).Error("Failed to calculate roughtime offset")
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user