Skip to content

Commit

Permalink
[ETCM-141] fix after merge scalafmt drop unused pendingTrxMgr from QA…
Browse files Browse the repository at this point in the history
…Service
  • Loading branch information
lemastero committed Oct 17, 2020
1 parent 3107461 commit 52e62dc
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 16 deletions.
10 changes: 3 additions & 7 deletions src/main/scala/io/iohk/ethereum/jsonrpc/QAService.scala
Expand Up @@ -8,7 +8,7 @@ import io.iohk.ethereum.blockchain.sync.regular.RegularSync.NewCheckpoint
import io.iohk.ethereum.consensus._
import io.iohk.ethereum.consensus.ethash.MinerResponses._
import io.iohk.ethereum.consensus.ethash.MockedMinerProtocol.MineBlocks
import io.iohk.ethereum.consensus.ethash.{MinerResponse, MinerResponses, TransactionPicker}
import io.iohk.ethereum.consensus.ethash.{MinerResponse, MinerResponses}
import io.iohk.ethereum.crypto
import io.iohk.ethereum.crypto.ECDSASignature
import io.iohk.ethereum.domain.{Blockchain, Checkpoint}
Expand All @@ -19,18 +19,14 @@ import io.iohk.ethereum.utils.{BlockchainConfig, Logger}
import monix.execution.Scheduler.Implicits.global
import mouse.all._

import scala.concurrent.duration.FiniteDuration
import scala.concurrent.Future

class QAService(
consensus: Consensus,
blockchain: Blockchain,
blockchainConfig: BlockchainConfig,
val pendingTransactionsManager: ActorRef,
syncController: ActorRef,
val getTransactionFromPoolTimeout: FiniteDuration
) extends Logger
with TransactionPicker {
syncController: ActorRef
) extends Logger {

/**
* qa_mineBlocks that instructs mocked miner to mine given number of blocks
Expand Down
Expand Up @@ -376,9 +376,7 @@ trait QaServiceBuilder {
consensus,
blockchain,
blockchainConfig,
pendingTransactionsManager,
syncController,
txPoolConfig.getTransactionFromPoolTimeout
syncController
)
}

Expand Down
7 changes: 1 addition & 6 deletions src/test/scala/io/iohk/ethereum/jsonrpc/QAServiceSpec.scala
Expand Up @@ -15,7 +15,6 @@ import io.iohk.ethereum.nodebuilder.BlockchainConfigBuilder
import org.scalamock.scalatest.AsyncMockFactory

import scala.concurrent.Future
import scala.concurrent.duration.FiniteDuration

class QAServiceSpec
extends TestKit(ActorSystem("QAServiceSpec_System"))
Expand Down Expand Up @@ -112,18 +111,14 @@ class QAServiceSpec
}

lazy val testConsensus: TestConsensus = mock[TestConsensus]
lazy val pendingTransactionsManager = TestProbe()
lazy val getTransactionFromPoolTimeout: FiniteDuration = Timeouts.normalTimeout
lazy val blockchain = mock[BlockchainImpl]
lazy val syncController = TestProbe()

lazy val qaService = new QAService(
testConsensus,
blockchain,
blockchainConfig,
pendingTransactionsManager.ref,
syncController.ref,
getTransactionFromPoolTimeout
syncController.ref
)

lazy val mineBlocksReq = MineBlocksRequest(1, true, None)
Expand Down

0 comments on commit 52e62dc

Please sign in to comment.