Skip to content

Commit

Permalink
Remove unnecessary cast
Browse files Browse the repository at this point in the history
  • Loading branch information
fvictorio committed Mar 31, 2021
1 parent 55e9e6d commit 57df856
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -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";
Expand All @@ -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 }
Expand Down

0 comments on commit 57df856

Please sign in to comment.