Skip to content

Commit 22b0a6c

Browse files
authored
Some 0n -> BIGINT_0 replacements (#4147)
1 parent 2236535 commit 22b0a6c

File tree

4 files changed

+5
-5
lines changed

4 files changed

+5
-5
lines changed

packages/block/src/header/header.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -568,14 +568,14 @@ export class BlockHeader {
568568

569569
// Early exit (strictly < per spec)
570570
if (excessBlobGas + blobGasUsed < targetPerBlock) {
571-
return 0n
571+
return BIGINT_0
572572
}
573573

574574
// EIP-7918 reserve price check
575575
if (childCommon.isActivatedEIP(7918)) {
576576
const blobBaseCost = childCommon.param('blobBaseCost')
577577
const gasPerBlob = childCommon.param('blobGasPerBlob')
578-
const baseFee = this.baseFeePerGas ?? 0n
578+
const baseFee = this.baseFeePerGas ?? BIGINT_0
579579
const blobFee = this.getBlobGasPrice()
580580

581581
if (blobBaseCost * baseFee > gasPerBlob * blobFee) {

packages/client/src/config.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -584,7 +584,7 @@ export class Config {
584584
if (height >= (this.syncTargetHeight ?? BIGINT_0)) {
585585
this.syncTargetHeight = height
586586
this.lastSyncDate =
587-
typeof latest.timestamp === 'bigint' && latest.timestamp > 0n
587+
typeof latest.timestamp === 'bigint' && latest.timestamp > BIGINT_0
588588
? Number(latest.timestamp) * 1000
589589
: Date.now()
590590

packages/client/src/service/skeleton.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -609,7 +609,7 @@ export class Skeleton extends MetaDBManager {
609609
if (height >= (this.config.syncTargetHeight ?? BIGINT_0)) {
610610
this.config.syncTargetHeight = height
611611
this.lastSyncDate =
612-
typeof latest.timestamp === 'bigint' && latest.timestamp > 0n
612+
typeof latest.timestamp === 'bigint' && latest.timestamp > BIGINT_0
613613
? Number(latest.timestamp) * 1000
614614
: Date.now()
615615

packages/vm/src/buildBlock.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,7 @@ export class BlockBuilder {
206206
// as per the implementation of other clients geth/nethermind
207207
// although this should never happen as no withdrawals with 0
208208
// amount should ever land up here.
209-
if (amount === 0n) continue
209+
if (amount === BIGINT_0) continue
210210
// Withdrawal amount is represented in Gwei so needs to be
211211
// converted to wei
212212
await rewardAccount(this.vm.evm, address, amount * GWEI_TO_WEI, this.vm.common)

0 commit comments

Comments
 (0)