Skip to content
This repository was archived by the owner on Mar 5, 2025. It is now read-only.
This repository was archived by the owner on Mar 5, 2025. It is now read-only.

TypeError: miner.startMining is not a function #2877

@king841997

Description

@king841997

import {Miner} from "web3-eth-miner";

const options =  {
        defaultAccount: "0x78dB3e2129D58685444989dD9682DDDC70dd3C82",
        defaultBlock: 'latest',
        defaultGas: 3000000000,
        defaultGasPrice: 3000000,
        transactionBlockTimeout: 50,
        transactionConfirmationBlocks: 24,
        transactionPollingTimeout: 480,
      }
      const miner = new Miner(web3.givenProvider, null,options);
        await miner.startMining(2).then(console.log)

It still throws an error TypeError: miner.startMining is not a function

Metadata

Metadata

Assignees

No one assigned

    Labels

    2.x2.0 related issuesBugAddressing a bug

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions