From 57df8569161cc9f1da69e5f6b8844ef8f19b2932 Mon Sep 17 00:00:00 2001 From: Franco Victorio Date: Wed, 31 Mar 2021 12:23:39 -0300 Subject: [PATCH] Remove unnecessary cast --- .../hardhat-network/provider/fork/ForkBlockchain.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/hardhat-core/test/internal/hardhat-network/provider/fork/ForkBlockchain.ts b/packages/hardhat-core/test/internal/hardhat-network/provider/fork/ForkBlockchain.ts index a5bda34781..b648a76faf 100644 --- a/packages/hardhat-core/test/internal/hardhat-network/provider/fork/ForkBlockchain.ts +++ b/packages/hardhat-core/test/internal/hardhat-network/provider/fork/ForkBlockchain.ts @@ -1,7 +1,7 @@ import { Block } from "@ethereumjs/block"; import Common from "@ethereumjs/common"; import { assert } from "chai"; -import { BN, BufferLike, bufferToHex, toBuffer, zeros } from "ethereumjs-util"; +import { BN, bufferToHex, toBuffer, zeros } from "ethereumjs-util"; import { JsonRpcClient } from "../../../../../src/internal/hardhat-network/jsonrpc/client"; import { ForkBlockchain } from "../../../../../src/internal/hardhat-network/provider/fork/ForkBlockchain"; @@ -27,13 +27,13 @@ describe("ForkBlockchain", () => { let common: Common; let fb: ForkBlockchain; - function createBlock(parent: Block, difficulty: BufferLike = zeros(32)) { + function createBlock(parent: Block, difficulty: number | Buffer = zeros(32)) { return Block.fromBlockData( { header: { number: new BN(parent.header.number).addn(1), parentHash: parent.hash(), - difficulty: new BN(difficulty as Buffer), + difficulty: new BN(difficulty), }, }, { common }