Skip to content

Commit b50c12d

Browse files
author
Leonor Boga
committed
[ETCM-1045] Fix compilation warnings
1 parent 8d8d6cb commit b50c12d

File tree

20 files changed

+52
-65
lines changed

20 files changed

+52
-65
lines changed

src/it/scala/io/iohk/ethereum/ledger/BlockImporterItSpec.scala

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ class BlockImporterItSpec
6161
mkConsensus(validators = successValidators),
6262
blockchainReader,
6363
storagesInstance.storages.stateStorage,
64-
new BranchResolution(blockchain, blockchainReader),
64+
new BranchResolution(blockchainReader),
6565
syncConfig,
6666
ommersPoolProbe.ref,
6767
broadcasterProbe.ref,
@@ -174,7 +174,7 @@ class BlockImporterItSpec
174174
mkConsensus(validators = successValidators),
175175
blockchainReader,
176176
storagesInstance.storages.stateStorage,
177-
new BranchResolution(blockchain, blockchainReader),
177+
new BranchResolution(blockchainReader),
178178
syncConfig,
179179
ommersPoolProbe.ref,
180180
broadcasterProbe.ref,
@@ -203,7 +203,7 @@ class BlockImporterItSpec
203203

204204
class TestFixture extends TestSetupWithVmAndValidators {
205205

206-
override lazy val blockQueue: BlockQueue = BlockQueue(blockchain, blockchainReader, SyncConfig(Config.config))
206+
override lazy val blockQueue: BlockQueue = BlockQueue(blockchainReader, SyncConfig(Config.config))
207207

208208
val genesis: Block = Block(
209209
Fixtures.Blocks.Genesis.header.copy(stateRoot = ByteString(MerklePatriciaTrie.EmptyRootHash)),
@@ -261,7 +261,7 @@ class TestFixture extends TestSetupWithVmAndValidators {
261261
consensus,
262262
blockchainReader,
263263
storagesInstance.storages.stateStorage,
264-
new BranchResolution(blockchain, blockchainReader),
264+
new BranchResolution(blockchainReader),
265265
syncConfig,
266266
ommersPoolProbe.ref,
267267
broadcasterProbe.ref,

src/it/scala/io/iohk/ethereum/sync/util/RegularSyncItSpecUtils.scala

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ object RegularSyncItSpecUtils {
9494

9595
lazy val mining: PoWMining = buildEthashMining()
9696

97-
lazy val blockQueue: BlockQueue = BlockQueue(bl, blockchainReader, syncConfig)
97+
lazy val blockQueue: BlockQueue = BlockQueue(blockchainReader, syncConfig)
9898
lazy val blockValidation = new BlockValidation(mining, blockchainReader, blockQueue)
9999
lazy val blockExecution =
100100
new BlockExecution(
@@ -150,7 +150,7 @@ object RegularSyncItSpecUtils {
150150
blockImport,
151151
blockchainReader,
152152
storagesInstance.storages.stateStorage,
153-
new BranchResolution(bl, blockchainReader),
153+
new BranchResolution(blockchainReader),
154154
syncConfig,
155155
ommersPool,
156156
broadcasterRef,
@@ -168,7 +168,7 @@ object RegularSyncItSpecUtils {
168168
blockImport,
169169
blockchainReader,
170170
storagesInstance.storages.stateStorage,
171-
new BranchResolution(bl, blockchainReader),
171+
new BranchResolution(blockchainReader),
172172
validators.blockValidator,
173173
blacklist,
174174
testSyncConfig,
@@ -194,7 +194,7 @@ object RegularSyncItSpecUtils {
194194
case None => blockchainReader.getBestBlock().get
195195
}).flatMap { block =>
196196
Task {
197-
val currentWeight = bl
197+
val currentWeight = blockchainReader
198198
.getChainWeightByHash(block.hash)
199199
.getOrElse(throw new RuntimeException(s"ChainWeight by hash: ${block.hash} doesn't exist"))
200200
val currentWorld = getMptForBlock(block)
@@ -210,7 +210,7 @@ object RegularSyncItSpecUtils {
210210
plusDifficulty: BigInt = 0
211211
)(updateWorldForBlock: (BigInt, InMemoryWorldStateProxy) => InMemoryWorldStateProxy): Task[Unit] = Task {
212212
val block: Block = blockchainReader.getBestBlock().get
213-
val currentWeight = bl
213+
val currentWeight = blockchainReader
214214
.getChainWeightByHash(block.hash)
215215
.getOrElse(throw new RuntimeException(s"ChainWeight by hash: ${block.hash} doesn't exist"))
216216
val currentWorld = getMptForBlock(block)

src/it/scala/io/iohk/ethereum/txExecTest/ContractTest.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ class ContractTest extends AnyFlatSpec with Matchers {
2222

2323
//block only with ether transfers
2424
override lazy val blockValidation =
25-
new BlockValidation(mining, blockchainReader, BlockQueue(blockchain, blockchainReader, syncConfig))
25+
new BlockValidation(mining, blockchainReader, BlockQueue(blockchainReader, syncConfig))
2626
override lazy val blockExecution =
2727
new BlockExecution(
2828
blockchain,

src/it/scala/io/iohk/ethereum/txExecTest/ECIP1017Test.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ class ECIP1017Test extends AnyFlatSpec with Matchers {
8484
val blockchainWriter = BlockchainWriter(storages)
8585
val blockchain = BlockchainImpl(storages, blockchainReader)
8686
val blockValidation =
87-
new BlockValidation(mining, blockchainReader, BlockQueue(blockchain, blockchainReader, syncConfig))
87+
new BlockValidation(mining, blockchainReader, BlockQueue(blockchainReader, syncConfig))
8888
val blockExecution =
8989
new BlockExecution(
9090
blockchain,

src/it/scala/io/iohk/ethereum/txExecTest/ForksTest.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ class ForksTest extends AnyFlatSpec with Matchers {
6060
val blockchainWriter = BlockchainWriter(storages)
6161
val blockchain = BlockchainImpl(storages, blockchainReader)
6262
val blockValidation =
63-
new BlockValidation(mining, blockchainReader, BlockQueue(blockchain, blockchainReader, syncConfig))
63+
new BlockValidation(mining, blockchainReader, BlockQueue(blockchainReader, syncConfig))
6464
val blockExecution =
6565
new BlockExecution(
6666
blockchain,

src/main/scala/io/iohk/ethereum/domain/BlockchainReader.scala

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,14 @@
11
package io.iohk.ethereum.domain
22

33
import akka.util.ByteString
4-
import io.iohk.ethereum.db.storage.{
5-
AppStateStorage,
6-
BlockBodiesStorage,
7-
BlockHeadersStorage,
8-
BlockNumberMappingStorage,
9-
ChainWeightStorage,
10-
ReceiptStorage,
11-
StateStorage
12-
}
4+
5+
import io.iohk.ethereum.db.storage.AppStateStorage
6+
import io.iohk.ethereum.db.storage.BlockBodiesStorage
7+
import io.iohk.ethereum.db.storage.BlockHeadersStorage
8+
import io.iohk.ethereum.db.storage.BlockNumberMappingStorage
9+
import io.iohk.ethereum.db.storage.ChainWeightStorage
10+
import io.iohk.ethereum.db.storage.ReceiptStorage
11+
import io.iohk.ethereum.db.storage.StateStorage
1312
import io.iohk.ethereum.domain.branch.BestBranch
1413
import io.iohk.ethereum.domain.branch.Branch
1514
import io.iohk.ethereum.domain.branch.EmptyBranch

src/main/scala/io/iohk/ethereum/ledger/BlockQueue.scala

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,17 +17,15 @@ object BlockQueue {
1717
case class QueuedBlock(block: Block, weight: Option[ChainWeight])
1818
case class Leaf(hash: ByteString, weight: ChainWeight)
1919

20-
def apply(blockchain: Blockchain, blockchainReader: BlockchainReader, syncConfig: SyncConfig): BlockQueue =
20+
def apply(blockchainReader: BlockchainReader, syncConfig: SyncConfig): BlockQueue =
2121
new BlockQueue(
22-
blockchain,
2322
blockchainReader,
2423
syncConfig.maxQueuedBlockNumberAhead,
2524
syncConfig.maxQueuedBlockNumberBehind
2625
)
2726
}
2827

2928
class BlockQueue(
30-
blockchain: Blockchain,
3129
blockchainReader: BlockchainReader,
3230
val maxQueuedBlockNumberAhead: Int,
3331
val maxQueuedBlockNumberBehind: Int
@@ -127,7 +125,7 @@ class BlockQueue(
127125
Nil
128126
}
129127

130-
recur(descendant, false).reverse
128+
recur(hash = descendant, childShared = false).reverse
131129
}
132130

133131
/** Removes a whole subtree begining with the ancestor. To be used when ancestor fails to execute

src/main/scala/io/iohk/ethereum/network/Peer.scala

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ import java.net.InetSocketAddress
44

55
import akka.NotUsed
66
import akka.actor.ActorRef
7-
import akka.pattern.Patterns.ask
87
import akka.stream.scaladsl.Source
98
import akka.util.ByteString
109

src/main/scala/io/iohk/ethereum/network/PeerActor.scala

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ import java.net.URI
66
import akka.NotUsed
77
import akka.actor.SupervisorStrategy.Escalate
88
import akka.actor._
9-
import akka.stream.OverflowStrategy
109
import akka.stream.scaladsl.Source
1110
import akka.util.ByteString
1211

src/main/scala/io/iohk/ethereum/network/PeerEventBusActor.scala

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,19 +7,14 @@ import akka.actor.Props
77
import akka.actor.Terminated
88
import akka.event.ActorEventBus
99
import akka.stream.OverflowStrategy
10-
import akka.stream.WatchedActorTerminatedException
1110
import akka.stream.scaladsl.Source
12-
import akka.util.Timeout
13-
14-
import scala.concurrent.Future
1511

1612
import io.iohk.ethereum.network.PeerEventBusActor.PeerEvent.MessageFromPeer
1713
import io.iohk.ethereum.network.PeerEventBusActor.PeerEvent.PeerDisconnected
1814
import io.iohk.ethereum.network.PeerEventBusActor.PeerEvent.PeerHandshakeSuccessful
1915
import io.iohk.ethereum.network.PeerEventBusActor.SubscriptionClassifier._
2016
import io.iohk.ethereum.network.handshaker.Handshaker.HandshakeResult
2117
import io.iohk.ethereum.network.p2p.Message
22-
import io.iohk.ethereum.network.p2p.messages.Codes
2318

2419
object PeerEventBusActor {
2520
def props: Props = Props(new PeerEventBusActor)

src/main/scala/io/iohk/ethereum/network/PeerManagerActor.scala

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ import java.util.Collections.newSetFromMap
66

77
import akka.actor.SupervisorStrategy.Stop
88
import akka.actor._
9-
import akka.stream.scaladsl.Source
109
import akka.util.ByteString
1110
import akka.util.Timeout
1211

src/main/scala/io/iohk/ethereum/nodebuilder/NodeBuilder.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,7 @@ trait BlockchainBuilder {
183183
trait BlockQueueBuilder {
184184
self: BlockchainBuilder with SyncConfigBuilder =>
185185

186-
lazy val blockQueue: BlockQueue = BlockQueue(blockchain, blockchainReader, syncConfig)
186+
lazy val blockQueue: BlockQueue = BlockQueue(blockchainReader, syncConfig)
187187
}
188188

189189
trait ConsensusBuilder {

src/test/scala/io/iohk/ethereum/blockchain/sync/regular/RegularSyncFixtures.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ trait RegularSyncFixtures { self: Matchers with AsyncMockFactory =>
7777
val checkpointBlockGenerator: CheckpointBlockGenerator = new CheckpointBlockGenerator()
7878
val peersClient: TestProbe = TestProbe()
7979
val blacklist: CacheBasedBlacklist = CacheBasedBlacklist.empty(100)
80-
lazy val branchResolution = new BranchResolution(blockchain, blockchainReader)
80+
lazy val branchResolution = new BranchResolution(blockchainReader)
8181

8282
val stateStorage: StateStorage = stub[StateStorage]
8383

@@ -340,7 +340,7 @@ trait RegularSyncFixtures { self: Matchers with AsyncMockFactory =>
340340
}
341341
}
342342

343-
class FakeBranchResolution extends BranchResolution(stub[BlockchainImpl], stub[BlockchainReader]) {
343+
class FakeBranchResolution extends BranchResolution(stub[BlockchainReader]) {
344344
override def resolveBranch(headers: NonEmptyList[BlockHeader]): BranchResolutionResult = {
345345
val importedHashes = importedBlocksSet.map(_.hash).toSet
346346

src/test/scala/io/iohk/ethereum/consensus/blocks/BlockGeneratorSpec.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -691,7 +691,7 @@ class BlockGeneratorSpec extends AnyFlatSpec with Matchers with ScalaCheckProper
691691
mining.blockGenerator.withBlockTimestampProvider(blockTimestampProvider)
692692

693693
override lazy val blockValidation =
694-
new BlockValidation(mining, blockchainReader, BlockQueue(blockchain, blockchainReader, syncConfig))
694+
new BlockValidation(mining, blockchainReader, BlockQueue(blockchainReader, syncConfig))
695695
override lazy val blockExecution =
696696
new BlockExecution(
697697
blockchain,

src/test/scala/io/iohk/ethereum/ledger/BlockExecutionSpec.scala

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ class BlockExecutionSpec extends AnyWordSpec with Matchers with ScalaCheckProper
6262
val mockValidators = new MockValidatorsFailOnSpecificBlockNumber(block1.header.number)
6363
val newMining: TestMining = mining.withVM(vm).withValidators(mockValidators)
6464
override lazy val blockValidation =
65-
new BlockValidation(newMining, blockchainReader, BlockQueue(blockchain, blockchainReader, syncConfig))
65+
new BlockValidation(newMining, blockchainReader, BlockQueue(blockchainReader, syncConfig))
6666
override lazy val blockExecution =
6767
new BlockExecution(
6868
blockchain,
@@ -104,7 +104,7 @@ class BlockExecutionSpec extends AnyWordSpec with Matchers with ScalaCheckProper
104104
val mockValidators = new MockValidatorsFailOnSpecificBlockNumber(block2.header.number)
105105
val newMining: TestMining = mining.withVM(mockVm).withValidators(mockValidators)
106106
override lazy val blockValidation =
107-
new BlockValidation(newMining, blockchainReader, BlockQueue(blockchain, blockchainReader, syncConfig))
107+
new BlockValidation(newMining, blockchainReader, BlockQueue(blockchainReader, syncConfig))
108108
override lazy val blockExecution =
109109
new BlockExecution(
110110
blockchain,
@@ -139,7 +139,7 @@ class BlockExecutionSpec extends AnyWordSpec with Matchers with ScalaCheckProper
139139
val mockValidators = new MockValidatorsFailOnSpecificBlockNumber(chain.last.number)
140140
val newMining: TestMining = mining.withVM(mockVm).withValidators(mockValidators)
141141
override lazy val blockValidation =
142-
new BlockValidation(newMining, blockchainReader, BlockQueue(blockchain, blockchainReader, syncConfig))
142+
new BlockValidation(newMining, blockchainReader, BlockQueue(blockchainReader, syncConfig))
143143
override lazy val blockExecution =
144144
new BlockExecution(
145145
blockchain,
@@ -170,7 +170,7 @@ class BlockExecutionSpec extends AnyWordSpec with Matchers with ScalaCheckProper
170170
val mockValidators = MockValidatorsAlwaysSucceed
171171
val newMining: TestMining = mining.withVM(vm).withValidators(mockValidators)
172172
override lazy val blockValidation =
173-
new BlockValidation(newMining, blockchainReader, BlockQueue(blockchain, blockchainReader, syncConfig))
173+
new BlockValidation(newMining, blockchainReader, BlockQueue(blockchainReader, syncConfig))
174174
override lazy val blockExecution =
175175
new BlockExecution(
176176
blockchain,
@@ -237,7 +237,7 @@ class BlockExecutionSpec extends AnyWordSpec with Matchers with ScalaCheckProper
237237
val newMining: TestMining = mining.withVM(mockVm)
238238

239239
override lazy val blockValidation =
240-
new BlockValidation(newMining, blockchainReader, BlockQueue(blockchain, blockchainReader, syncConfig))
240+
new BlockValidation(newMining, blockchainReader, BlockQueue(blockchainReader, syncConfig))
241241
override lazy val blockExecution =
242242
new BlockExecution(
243243
blockchain,
@@ -262,7 +262,7 @@ class BlockExecutionSpec extends AnyWordSpec with Matchers with ScalaCheckProper
262262
originAddress -> UpdateBalance(-minerPaymentForTxs), // Origin payment for tx execution and nonce increase
263263
minerAddress -> UpdateBalance(minerPaymentForTxs) // Miner reward for tx execution
264264
)
265-
val expectedStateRoot: ByteString = applyChanges(validBlockParentHeader.stateRoot, blockchainStorages, changes)
265+
val expectedStateRoot: ByteString = applyChanges(validBlockParentHeader.stateRoot, changes)
266266
expectedStateRoot shouldBe InMemoryWorldStateProxy.persistState(resultingWorldState).stateRootHash
267267

268268
// Check valid gasUsed
@@ -315,7 +315,7 @@ class BlockExecutionSpec extends AnyWordSpec with Matchers with ScalaCheckProper
315315

316316
val newConsensus = mining.withValidators(mockValidators).withVM(mockVm)
317317
val blockValidation =
318-
new BlockValidation(newConsensus, blockchainReader, BlockQueue(blockchain, blockchainReader, syncConfig))
318+
new BlockValidation(newConsensus, blockchainReader, BlockQueue(blockchainReader, syncConfig))
319319
val blockExecution =
320320
new BlockExecution(
321321
blockchain,
@@ -340,7 +340,7 @@ class BlockExecutionSpec extends AnyWordSpec with Matchers with ScalaCheckProper
340340
originAddress -> UpdateBalance(-minerPaymentForTxs), // Origin payment for tx execution and nonce increase
341341
minerAddress -> UpdateBalance(minerPaymentForTxs) // Miner reward for tx execution
342342
) ++ addressesToDelete.map(address => address -> DeleteAccount) // Delete all accounts to be deleted
343-
val expectedStateRoot = applyChanges(validBlockParentHeader.stateRoot, blockchainStorages, changes)
343+
val expectedStateRoot = applyChanges(validBlockParentHeader.stateRoot, changes)
344344
expectedStateRoot shouldBe InMemoryWorldStateProxy.persistState(resultingWorldState).stateRootHash
345345

346346
// Check valid gasUsed
@@ -421,7 +421,7 @@ class BlockExecutionSpec extends AnyWordSpec with Matchers with ScalaCheckProper
421421
ommerAddress -> UpdateBalance(UInt256(ommerReward))
422422
}
423423

424-
val expectedStateRoot = applyChanges(validBlockParentHeader.stateRoot, blockchainStorages, changes)
424+
val expectedStateRoot = applyChanges(validBlockParentHeader.stateRoot, changes)
425425

426426
val blockHeader: BlockHeader = validBlockHeader.copy(stateRoot = expectedStateRoot)
427427
val blockBodyWithOmmers = validBlockBodyWithNoTxs.copy(
@@ -476,7 +476,7 @@ class BlockExecutionSpec extends AnyWordSpec with Matchers with ScalaCheckProper
476476
val changes = Seq(
477477
minerAddress -> UpdateBalance(UInt256(blockReward)) // Paying miner for block processing
478478
)
479-
val expectedStateRoot: ByteString = applyChanges(validBlockParentHeader.stateRoot, blockchainStorages, changes)
479+
val expectedStateRoot: ByteString = applyChanges(validBlockParentHeader.stateRoot, changes)
480480
val blockHeader: BlockHeader = validBlockHeader.copy(stateRoot = expectedStateRoot)
481481
val block = Block(blockHeader, validBlockBodyWithNoTxs)
482482

@@ -517,7 +517,7 @@ class BlockExecutionSpec extends AnyWordSpec with Matchers with ScalaCheckProper
517517
mining.blockPreparator.blockRewardCalculator.calculateMiningReward(validBlockHeader.number, 0)
518518

519519
val changes = Seq(minerAddress -> UpdateBalance(UInt256(blockReward))) //Paying miner for block processing
520-
val correctStateRoot: ByteString = applyChanges(validBlockParentHeader.stateRoot, blockchainStorages, changes)
520+
val correctStateRoot: ByteString = applyChanges(validBlockParentHeader.stateRoot, changes)
521521

522522
val correctGasUsed: BigInt = 0
523523
val incorrectStateRoot: ByteString =
@@ -605,7 +605,7 @@ class BlockExecutionSpec extends AnyWordSpec with Matchers with ScalaCheckProper
605605
origin1Address -> UpdateBalance(-minerPaymentForTx1), // Origin payment for tx execution and nonce increase
606606
minerAddress -> UpdateBalance(minerPaymentForTx1) // Miner reward for tx execution
607607
)
608-
val expectedStateRootTx1 = applyChanges(validBlockParentHeader.stateRoot, blockchainStorages, changesTx1)
608+
val expectedStateRootTx1 = applyChanges(validBlockParentHeader.stateRoot, changesTx1)
609609

610610
val Receipt(rootHashReceipt1, gasUsedReceipt1, logsBloomFilterReceipt1, logsReceipt1) = receipt1
611611
rootHashReceipt1 shouldBe HashOutcome(expectedStateRootTx1)
@@ -620,7 +620,7 @@ class BlockExecutionSpec extends AnyWordSpec with Matchers with ScalaCheckProper
620620
origin2Address -> UpdateBalance(-minerPaymentForTx2), // Origin payment for tx execution and nonce increase
621621
minerAddress -> UpdateBalance(minerPaymentForTx2) // Miner reward for tx execution
622622
)
623-
val expectedStateRootTx2 = applyChanges(expectedStateRootTx1, blockchainStorages, changesTx2)
623+
val expectedStateRootTx2 = applyChanges(expectedStateRootTx1, changesTx2)
624624

625625
val Receipt(rootHashReceipt2, gasUsedReceipt2, logsBloomFilterReceipt2, logsReceipt2) = receipt2
626626
rootHashReceipt2 shouldBe HashOutcome(expectedStateRootTx2)
@@ -636,7 +636,7 @@ class BlockExecutionSpec extends AnyWordSpec with Matchers with ScalaCheckProper
636636
val changes = Seq(
637637
minerAddress -> UpdateBalance(UInt256(blockReward))
638638
)
639-
val blockExpectedStateRoot = applyChanges(expectedStateRootTx2, blockchainStorages, changes)
639+
val blockExpectedStateRoot = applyChanges(expectedStateRootTx2, changes)
640640

641641
val blockWithCorrectStateAndGasUsed = block.copy(
642642
header = block.header.copy(stateRoot = blockExpectedStateRoot, gasUsed = gasUsedReceipt2)
@@ -685,7 +685,7 @@ class BlockExecutionSpec extends AnyWordSpec with Matchers with ScalaCheckProper
685685
trait BlockExecutionTestSetup extends BlockchainSetup {
686686

687687
override lazy val blockValidation =
688-
new BlockValidation(mining, blockchainReader, BlockQueue(blockchain, blockchainReader, syncConfig))
688+
new BlockValidation(mining, blockchainReader, BlockQueue(blockchainReader, syncConfig))
689689
override lazy val blockExecution =
690690
new BlockExecution(
691691
blockchain,

src/test/scala/io/iohk/ethereum/ledger/BlockQueueSpec.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@ class BlockQueueSpec extends AnyFlatSpec with Matchers with MockFactory {
167167
SyncConfig(Config.config).copy(maxQueuedBlockNumberAhead = 10, maxQueuedBlockNumberBehind = 10)
168168
val blockchainReader: BlockchainReader = mock[BlockchainReader]
169169
val blockchain: BlockchainImpl = mock[BlockchainImpl]
170-
val blockQueue: BlockQueue = BlockQueue(blockchain, blockchainReader, syncConfig)
170+
val blockQueue: BlockQueue = BlockQueue(blockchainReader, syncConfig)
171171

172172
def setBestBlockNumber(n: BigInt): CallHandler0[BigInt] =
173173
(blockchainReader.getBestBlockNumber _).expects().returning(n)

src/test/scala/io/iohk/ethereum/ledger/BlockValidationSpec.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ class BlockValidationSpec extends AnyWordSpec with Matchers with MockFactory {
5959
new BlockValidation(
6060
setup.mining,
6161
setup.blockchainReader,
62-
BlockQueue(setup.blockchain, setup.blockchainReader, setup.syncConfig)
62+
BlockQueue(setup.blockchainReader, setup.syncConfig)
6363
)
6464

6565
def hash2ByteString(hash: String): ByteString = ByteString(Hex.decode(hash))

0 commit comments

Comments
 (0)