diff --git a/Gopkg.lock b/Gopkg.lock index d2f8c57113..d880b41509 100644 --- a/Gopkg.lock +++ b/Gopkg.lock @@ -686,6 +686,13 @@ pruneopts = "T" revision = "0bc96f33a18ef2f963e75431dbed042129eb421b" +[[projects]] + digest = "1:1726681d0181b61f4e256aeda39fa53f29268bab43b32ebe78f0223dd910dcfd" + name = "github.com/stellar/throttled" + packages = ["."] + pruneopts = "T" + revision = "89d75816f59db3124e575e96b35d4b7d927cde93" + [[projects]] digest = "1:1087cae51acd825ff03792b392a34486a261b9673a9514df0b712051edee0c2b" name = "github.com/stretchr/objx" @@ -705,14 +712,6 @@ pruneopts = "T" revision = "976c720a22c8eb4eb6a0b4348ad85ad12491a506" -[[projects]] - digest = "1:a6dd23012ca65b72dbca7b3e06dac44a9bb33b018221a26f213b1802cddfc337" - name = "github.com/throttled/throttled" - packages = ["."] - pruneopts = "T" - revision = "c99eef3ad70a3be5a983770523e0e379699c805c" - source = "https://github.com/bartekn/throttled.git" - [[projects]] branch = "master" digest = "1:ec528a786fa75556deed44de7118a74ced456360e782786a20aed292a03955a5" @@ -970,11 +969,11 @@ "github.com/spf13/cobra", "github.com/spf13/viper", "github.com/stellar/go-xdr/xdr3", + "github.com/stellar/throttled", "github.com/stretchr/testify/assert", "github.com/stretchr/testify/mock", "github.com/stretchr/testify/require", "github.com/stretchr/testify/suite", - "github.com/throttled/throttled", "github.com/tyler-smith/go-bip32", "github.com/tyler-smith/go-bip39", "golang.org/x/crypto/ed25519", diff --git a/Gopkg.toml b/Gopkg.toml index 96e9d247cf..f0c333c48d 100644 --- a/Gopkg.toml +++ b/Gopkg.toml @@ -59,9 +59,8 @@ revision = "070c81def33f6362a8267b6a4e56fb7bf23fc6b5" [[constraint]] - name = "github.com/throttled/throttled" - source = "https://github.com/bartekn/throttled.git" - revision = "c99eef3ad70a3be5a983770523e0e379699c805c" + name = "github.com/stellar/throttled" + revision = "89d75816f59db3124e575e96b35d4b7d927cde93" [[constraint]] name = "golang.org/x/crypto" diff --git a/services/horizon/cmd/root.go b/services/horizon/cmd/root.go index d75cd57f36..955c9a7b46 100644 --- a/services/horizon/cmd/root.go +++ b/services/horizon/cmd/root.go @@ -15,7 +15,7 @@ import ( apkg "github.com/stellar/go/support/app" support "github.com/stellar/go/support/config" "github.com/stellar/go/support/log" - "github.com/throttled/throttled" + "github.com/stellar/throttled" ) var config horizon.Config diff --git a/services/horizon/internal/actions/rate_limiter_provider.go b/services/horizon/internal/actions/rate_limiter_provider.go index db0cbd4996..b2954c4653 100644 --- a/services/horizon/internal/actions/rate_limiter_provider.go +++ b/services/horizon/internal/actions/rate_limiter_provider.go @@ -1,6 +1,6 @@ package actions -import "github.com/throttled/throttled" +import "github.com/stellar/throttled" // RateLimiterProvider is an interface that provides access to the type's HTTPRateLimiter. type RateLimiterProvider interface { diff --git a/services/horizon/internal/app.go b/services/horizon/internal/app.go index 9ee8877ef5..bf13425ab7 100644 --- a/services/horizon/internal/app.go +++ b/services/horizon/internal/app.go @@ -29,7 +29,7 @@ import ( "github.com/stellar/go/support/db" "github.com/stellar/go/support/errors" "github.com/stellar/go/support/log" - "github.com/throttled/throttled" + "github.com/stellar/throttled" "golang.org/x/net/http2" graceful "gopkg.in/tylerb/graceful.v1" ) diff --git a/services/horizon/internal/config.go b/services/horizon/internal/config.go index 63d13060c3..524aa482be 100644 --- a/services/horizon/internal/config.go +++ b/services/horizon/internal/config.go @@ -5,7 +5,7 @@ import ( "time" "github.com/sirupsen/logrus" - "github.com/throttled/throttled" + "github.com/stellar/throttled" ) // Config is the configuration for horizon. It gets populated by the diff --git a/services/horizon/internal/helpers_test.go b/services/horizon/internal/helpers_test.go index 6866c9c281..a5352a64e2 100644 --- a/services/horizon/internal/helpers_test.go +++ b/services/horizon/internal/helpers_test.go @@ -13,7 +13,7 @@ import ( "github.com/stellar/go/services/horizon/internal/actions" "github.com/stellar/go/services/horizon/internal/test" supportLog "github.com/stellar/go/support/log" - "github.com/throttled/throttled" + "github.com/stellar/throttled" ) func NewTestApp() *App { diff --git a/services/horizon/internal/middleware_test.go b/services/horizon/internal/middleware_test.go index a40091548a..645d031174 100644 --- a/services/horizon/internal/middleware_test.go +++ b/services/horizon/internal/middleware_test.go @@ -5,9 +5,9 @@ import ( "testing" "github.com/stellar/go/services/horizon/internal/test" + "github.com/stellar/throttled" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/suite" - "github.com/throttled/throttled" ) type RateLimitMiddlewareTestSuite struct { diff --git a/services/horizon/internal/web.go b/services/horizon/internal/web.go index 7d7a7c1e7c..68a5854b9f 100644 --- a/services/horizon/internal/web.go +++ b/services/horizon/internal/web.go @@ -24,7 +24,7 @@ import ( "github.com/stellar/go/support/db" "github.com/stellar/go/support/log" "github.com/stellar/go/support/render/problem" - "github.com/throttled/throttled" + "github.com/stellar/throttled" ) const LRUCacheSize = 50000