Skip to content

Commit 053890d

Browse files
committed
[ETCM-331] Minor Fixes - updates based on review
1 parent 341db30 commit 053890d

File tree

3 files changed

+17
-18
lines changed

3 files changed

+17
-18
lines changed

src/main/scala/io/iohk/ethereum/jsonrpc/server/http/RateLimit.scala

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,8 @@ import java.time.Clock
55
import akka.http.scaladsl.model.RemoteAddress
66
import com.twitter.util.LruMap
77
import io.iohk.ethereum.jsonrpc.server.http.JsonRpcHttpServer.JsonRpcHttpServerConfig
8-
import io.iohk.ethereum.utils.Logger
98

10-
trait RateLimit extends Logger {
9+
trait RateLimit {
1110

1211
val config: JsonRpcHttpServerConfig
1312

src/main/scala/io/iohk/ethereum/jsonrpc/server/http/SecureJsonRpcHttpServer.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ import scala.util.{Failure, Success}
1818
class SecureJsonRpcHttpServer(
1919
val jsonRpcController: JsonRpcBaseController,
2020
val jsonRpcHealthChecker: JsonRpcHealthChecker,
21-
override val config: JsonRpcHttpServerConfig,
21+
val config: JsonRpcHttpServerConfig,
2222
secureRandom: SecureRandom,
2323
getSSLContext: () => Either[SSLError, SSLContext]
2424
)(implicit val actorSystem: ActorSystem)

src/test/scala/io/iohk/ethereum/jsonrpc/server/http/JsonRpcHttpServerSpec.scala

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -241,26 +241,26 @@ class JsonRpcHttpServerSpec extends AnyFlatSpec with Matchers with ScalatestRout
241241
val fakeClock = new FakeClock
242242

243243
val mockJsonRpcHttpServer = new FakeJsonRpcHttpServer(
244-
mockJsonRpcController,
245-
mockJsonRpcHealthChecker,
246-
serverConfig,
247-
serverConfig.corsAllowedOrigins,
248-
fakeClock)
244+
jsonRpcController = mockJsonRpcController,
245+
jsonRpcHealthChecker = mockJsonRpcHealthChecker,
246+
config = serverConfig,
247+
cors = serverConfig.corsAllowedOrigins,
248+
testClock = fakeClock)
249249

250250
val corsAllowedOrigin = HttpOrigin("http://localhost:3333")
251251
val mockJsonRpcHttpServerWithCors = new FakeJsonRpcHttpServer(
252-
mockJsonRpcController,
253-
mockJsonRpcHealthChecker,
254-
serverConfig,
255-
HttpOriginMatcher(corsAllowedOrigin),
256-
fakeClock)
252+
jsonRpcController = mockJsonRpcController,
253+
jsonRpcHealthChecker = mockJsonRpcHealthChecker,
254+
config = serverConfig,
255+
cors = HttpOriginMatcher(corsAllowedOrigin),
256+
testClock = fakeClock)
257257

258258
val mockJsonRpcHttpServerWithRateLimit = new FakeJsonRpcHttpServer(
259-
mockJsonRpcController,
260-
mockJsonRpcHealthChecker,
261-
serverConfigWithRateLimit,
262-
serverConfigWithRateLimit.corsAllowedOrigins,
263-
fakeClock)
259+
jsonRpcController = mockJsonRpcController,
260+
jsonRpcHealthChecker = mockJsonRpcHealthChecker,
261+
config = serverConfigWithRateLimit,
262+
cors = serverConfigWithRateLimit.corsAllowedOrigins,
263+
testClock = fakeClock)
264264
}
265265
}
266266

0 commit comments

Comments
 (0)