Skip to content

Commit 69227c9

Browse files
author
Aurélien Richez
committed
fix typo
1 parent 75078be commit 69227c9

File tree

1 file changed

+8
-7
lines changed

1 file changed

+8
-7
lines changed

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

Lines changed: 8 additions & 7 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
@@ -201,8 +202,8 @@ class BlockchainImpl(
201202
removeBlockNumberMapping(block.number)
202203
else blockNumberMappingStorage.emptyBatchUpdate
203204

204-
val potientialNewBestBlockNumber: BigInt = (block.number - 1).max(0)
205-
val potientialNewBestBlockHash: ByteString = block.header.parentHash
205+
val potentialNewBestBlockNumber: BigInt = (block.number - 1).max(0)
206+
val potentialNewBestBlockHash: ByteString = block.header.parentHash
206207
val newLatestCheckpointNumber: BigInt =
207208
if (block.hasCheckpoint && block.number == latestCheckpointNumber) {
208209
findPreviousCheckpointBlockNumber(block.number, block.number)
@@ -218,8 +219,8 @@ class BlockchainImpl(
218219
into the case of having an incomplete best block and so an inconsistent db
219220
*/
220221
val bestBlockNumberUpdates =
221-
if (appStateStorage.getBestBlockNumber() > potientialNewBestBlockNumber)
222-
appStateStorage.putBestBlockData(BestBlockInfo(potientialNewBestBlockHash, potientialNewBestBlockNumber))
222+
if (appStateStorage.getBestBlockNumber() > potentialNewBestBlockNumber)
223+
appStateStorage.putBestBlockData(BestBlockInfo(potentialNewBestBlockHash, potentialNewBestBlockNumber))
223224
else appStateStorage.emptyBatchUpdate
224225
val latestCheckpointNumberUpdates =
225226
if (appStateStorage.getLatestCheckpointBlockNumber() > newLatestCheckpointNumber)
@@ -228,7 +229,7 @@ class BlockchainImpl(
228229

229230
log.debug(
230231
"Persisting app info data into database. Persisted block number is {}. Persisted checkpoint number is {}",
231-
potientialNewBestBlockNumber,
232+
potentialNewBestBlockNumber,
232233
newLatestCheckpointNumber
233234
)
234235

@@ -243,11 +244,11 @@ class BlockchainImpl(
243244
.and(latestCheckpointNumberUpdates)
244245
.commit()
245246

246-
saveBestKnownBlocks(potientialNewBestBlockHash, potientialNewBestBlockNumber, Some(newLatestCheckpointNumber))
247+
saveBestKnownBlocks(potentialNewBestBlockHash, potentialNewBestBlockNumber, Some(newLatestCheckpointNumber))
247248
log.debug(
248249
"Removed block with hash {}. New best block number - {}, new best checkpoint block number - {}",
249250
ByteStringUtils.hash2string(blockHash),
250-
potientialNewBestBlockNumber,
251+
potentialNewBestBlockNumber,
251252
newLatestCheckpointNumber
252253
)
253254

0 commit comments

Comments
 (0)