Skip to content

Commit e94a518

Browse files
author
Aurélien Richez
committed
fix typo
1 parent eb63e8d commit e94a518

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

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

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

33
import akka.util.ByteString
4+
45
import scala.annotation.tailrec
56

67
import io.iohk.ethereum.db.dataSource.DataSourceBatchUpdate
@@ -183,8 +184,8 @@ class BlockchainImpl(
183184
removeBlockNumberMapping(block.number)
184185
else blockNumberMappingStorage.emptyBatchUpdate
185186

186-
val potientialNewBestBlockNumber: BigInt = (block.number - 1).max(0)
187-
val potientialNewBestBlockHash: ByteString = block.header.parentHash
187+
val potentialNewBestBlockNumber: BigInt = (block.number - 1).max(0)
188+
val potentialNewBestBlockHash: ByteString = block.header.parentHash
188189
val newLatestCheckpointNumber: BigInt =
189190
if (block.hasCheckpoint && block.number == latestCheckpointNumber) {
190191
findPreviousCheckpointBlockNumber(block.number, block.number)
@@ -200,8 +201,8 @@ class BlockchainImpl(
200201
into the case of having an incomplete best block and so an inconsistent db
201202
*/
202203
val bestBlockNumberUpdates =
203-
if (appStateStorage.getBestBlockNumber() > potientialNewBestBlockNumber)
204-
appStateStorage.putBestBlockData(BestBlockInfo(potientialNewBestBlockHash, potientialNewBestBlockNumber))
204+
if (appStateStorage.getBestBlockNumber() > potentialNewBestBlockNumber)
205+
appStateStorage.putBestBlockData(BestBlockInfo(potentialNewBestBlockHash, potentialNewBestBlockNumber))
205206
else appStateStorage.emptyBatchUpdate
206207
val latestCheckpointNumberUpdates =
207208
if (appStateStorage.getLatestCheckpointBlockNumber() > newLatestCheckpointNumber)
@@ -210,7 +211,7 @@ class BlockchainImpl(
210211

211212
log.debug(
212213
"Persisting app info data into database. Persisted block number is {}. Persisted checkpoint number is {}",
213-
potientialNewBestBlockNumber,
214+
potentialNewBestBlockNumber,
214215
newLatestCheckpointNumber
215216
)
216217

@@ -228,7 +229,7 @@ class BlockchainImpl(
228229
log.debug(
229230
"Removed block with hash {}. New best block number - {}, new best checkpoint block number - {}",
230231
ByteStringUtils.hash2string(blockHash),
231-
potientialNewBestBlockNumber,
232+
potentialNewBestBlockNumber,
232233
newLatestCheckpointNumber
233234
)
234235
}

0 commit comments

Comments
 (0)