Small fixes and cleanup

This commit is contained in:
Alex Browne
2018-06-05 15:12:09 -07:00
parent 36b01fbdcf
commit 63caddea62
6 changed files with 5 additions and 55 deletions

View File

@@ -406,32 +406,6 @@ export class Web3Wrapper {
}
return receipt;
}
/**
* Start the CPU mining process with the given number of threads and
* generate a new DAG if need be.
* @param threads The number of threads to mine on.
*/
public async minerStartAsync(threads: number = 1): Promise<void> {
await this._sendRawPayloadAsync<boolean>({
method: 'miner_start',
params: [threads],
});
}
/**
* Stop the CPU mining process.
* @param threads The number of threads to mine on.
*/
public async minerStopAsync(): Promise<void> {
await this._sendRawPayloadAsync<boolean>({ method: 'miner_stop', params: [] });
}
/**
* Returns true if client is actively mining new blocks.
* @returns A boolean indicating whether the node is currently mining.
*/
public async isMiningAsync(): Promise<boolean> {
const isMining = await promisify<boolean>(this._web3.eth.getMining)();
return isMining;
}
/**
* Sets the current head of the local chain by block number. Note, this is a
* destructive action and may severely damage your chain. Use with extreme