Skip to content

Commit

Permalink
fix error
Browse files Browse the repository at this point in the history
  • Loading branch information
ScottyPoi committed Jul 27, 2024
1 parent 10c5ff2 commit e92aba6
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
3 changes: 1 addition & 2 deletions packages/block/src/block.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ import { genRequestsTrieRoot, genTransactionsTrieRoot, genWithdrawalsTrieRoot }
// (situation will eventually improve on Typescript and/or Eslint update)
import {
BlockHeader,
createHeader,
type createBlockFromBeaconPayloadJson,
type createBlockFromBlockData,
type createBlockFromExecutionPayload,
Expand Down Expand Up @@ -101,7 +100,7 @@ export class Block {
requests?: CLRequest<CLRequestType>[],
executionWitness?: VerkleExecutionWitness | null,
) {
this.header = header ?? createHeader({}, opts)
this.header = header ?? new BlockHeader({}, opts)
this.common = this.header.common
this.keccakFunction = this.common.customCrypto.keccak256 ?? keccak256

Expand Down
4 changes: 2 additions & 2 deletions packages/block/src/header-from-rpc.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { numberToHex } from './helpers.js'

import { createHeader } from './index.js'
import { BlockHeader } from './index.js'

import type { BlockOptions, JsonRpcBlock } from './types.js'

Expand Down Expand Up @@ -35,7 +35,7 @@ export function blockHeaderFromRpc(blockParams: JsonRpcBlock, options?: BlockOpt
requestsRoot,
} = blockParams

const blockHeader = createHeader(
const blockHeader = new BlockHeader(
{
parentHash,
uncleHash: sha3Uncles,
Expand Down

0 comments on commit e92aba6

Please sign in to comment.