Skip to content

Commit

Permalink
Fix formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
ivan-mashonskiy committed Sep 19, 2024
1 parent 105563c commit 6882953
Showing 1 changed file with 28 additions and 28 deletions.
56 changes: 28 additions & 28 deletions src/main/scala/units/ELUpdater.scala
Original file line number Diff line number Diff line change
Expand Up @@ -835,10 +835,10 @@ class ELUpdater(
}

def rollbackAndFollowChain(
target: CommonBlockData,
nodeChainInfo: ChainInfo,
mainChainInfo: ChainInfo,
returnToMainChainInfo: Option[ReturnToMainChainInfo]
target: CommonBlockData,
nodeChainInfo: ChainInfo,
mainChainInfo: ChainInfo,
returnToMainChainInfo: Option[ReturnToMainChainInfo]
): Option[Working[FollowingChain]] = {
rollbackTo(prevState, target, finalizedContractBlock) match {
case Right(updatedState) =>
Expand Down Expand Up @@ -978,9 +978,9 @@ class ELUpdater(
}

private def preValidateBlock(
block: NetworkBlock,
parentPayload: ExecutionPayload,
epochInfo: Option[EpochInfo]
block: NetworkBlock,
parentPayload: ExecutionPayload,
epochInfo: Option[EpochInfo]
): JobResult[Unit] = {
for {
_ <- validateTimestamp(block, parentPayload)
Expand Down Expand Up @@ -1018,12 +1018,12 @@ class ELUpdater(
}

private def validateAndApplyMissedBlock(
block: NetworkBlock,
ch: Channel,
prevState: Working[ChainStatus],
contractBlock: ContractBlock,
parentPayload: ExecutionPayload,
nodeChainInfo: ChainInfo
block: NetworkBlock,
ch: Channel,
prevState: Working[ChainStatus],
contractBlock: ContractBlock,
parentPayload: ExecutionPayload,
nodeChainInfo: ChainInfo
): Unit = {
validateBlockFull(block, contractBlock, parentPayload, prevState) match {
case Right(updatedState) =>
Expand All @@ -1035,12 +1035,12 @@ class ELUpdater(
}

private def validateAndApply(
block: NetworkBlock,
ch: Channel,
prevState: Working[ChainStatus],
parentPayload: ExecutionPayload,
nodeChainInfo: ChainInfo,
returnToMainChainInfo: Option[ReturnToMainChainInfo]
block: NetworkBlock,
ch: Channel,
prevState: Working[ChainStatus],
parentPayload: ExecutionPayload,
nodeChainInfo: ChainInfo,
returnToMainChainInfo: Option[ReturnToMainChainInfo]
): Unit = {
chainContractClient.getBlock(block.hash) match {
case Some(contractBlock) if prevState.fullValidationStatus.lastValidatedBlock.hash == parentPayload.hash =>
Expand Down Expand Up @@ -1095,11 +1095,11 @@ class ELUpdater(
}

private def broadcastAndConfirmBlock(
block: NetworkBlock,
ch: Channel,
prevState: Working[ChainStatus],
nodeChainInfo: ChainInfo,
returnToMainChainInfo: Option[ReturnToMainChainInfo]
block: NetworkBlock,
ch: Channel,
prevState: Working[ChainStatus],
nodeChainInfo: ChainInfo,
returnToMainChainInfo: Option[ReturnToMainChainInfo]
): Unit = {
Try(allChannels.broadcast(block, Some(ch))).recover { err =>
logger.error(s"Failed to broadcast block ${block.hash}: ${err.getMessage}")
Expand Down Expand Up @@ -1293,10 +1293,10 @@ class ELUpdater(
}

private def validateBlockFull(
block: NetworkBlock,
contractBlock: ContractBlock,
parentPayload: ExecutionPayload,
prevState: Working[ChainStatus]
block: NetworkBlock,
contractBlock: ContractBlock,
parentPayload: ExecutionPayload,
prevState: Working[ChainStatus]
): JobResult[Working[ChainStatus]] = {
logger.debug(s"Trying to do full validation of block ${block.hash}")
for {
Expand Down

0 comments on commit 6882953

Please sign in to comment.