Skip to content

Commit 3a963c2

Browse files
author
Leonor Boga
committed
ETCM-1058 Fix code after rebase
1 parent cf461aa commit 3a963c2

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

src/main/scala/io/iohk/ethereum/consensus/ConsensusImpl.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -321,7 +321,7 @@ class ConsensusImpl(
321321
private def removeBlocksUntil(parent: ByteString, fromNumber: BigInt): List[BlockData] = {
322322
@tailrec
323323
def removeBlocksUntil(parent: ByteString, fromNumber: BigInt, acc: List[BlockData]): List[BlockData] =
324-
blockchainReader.getBestBranch().getBlockByNumber(fromNumber) match {
324+
blockchainReader.getBlockByNumber(blockchainReader.getBestBranch(), fromNumber) match {
325325
case Some(block) if block.header.hash == parent || fromNumber == 0 =>
326326
acc
327327

src/main/scala/io/iohk/ethereum/jsonrpc/TestService.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -264,7 +264,7 @@ class TestService(
264264
getBlockForMining(blockchainReader.getBestBlock().get)
265265
.flatMap(blockForMining =>
266266
testModeComponentsProvider
267-
.evaluateBranchBlock(preimageCache)
267+
.getConsensus(preimageCache)
268268
.evaluateBranchBlock(blockForMining.block)
269269
)
270270
.map { res =>
@@ -304,7 +304,7 @@ class TestService(
304304
Task.now(Left(JsonRpcError(-1, "block validation failed!", None)))
305305
case Success(value) =>
306306
testModeComponentsProvider
307-
.evaluateBranchBlock(preimageCache)
307+
.getConsensus(preimageCache)
308308
.evaluateBranchBlock(value)
309309
.flatMap(handleResult(value))
310310
}

src/main/scala/io/iohk/ethereum/testmode/TestModeComponentsProvider.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ class TestModeComponentsProvider(
2929
node: TestNode
3030
) {
3131

32-
def evaluateBranchBlock(
32+
def getConsensus(
3333
preimageCache: collection.concurrent.Map[ByteString, UInt256]
3434
): Consensus = {
3535
val consensuz = consensus()

0 commit comments

Comments
 (0)