How to disable mining functionality in wallet debug console?

-1

I am creating a new altcoin and i cant seem to figure out how to disable mining functionality with wallets using the debug console window.

I am trying to mine all the coins myself, is there way to restrict all mining to me or specific IP addresses.

I am using forking litecoin to create my altcoin.

Any advice or help with code is much apppreciated and helpful

pbu

Posted 2018-05-01T09:50:24.287

Reputation: 203

Answers

1

I am creating a new altcoin and i cant seem to figure out how to disable mining functionality with wallets using the debug console window.

Remove the generate and generatetoaddress commands.

I am trying to mine all the coins myself, is there way to restrict all mining to me or specific IP addresses.

Unless you modify blocks to include IP address information, no, there is not. You could restrict coinbase transactions to have only a specific output script which belongs to you so that blocks that have coinbase transactions where the coins go to another output script are considered invalid. However you will need to modify the mining code to use a fixed script instead of generating a new one for each block.

Andrew Chow

Posted 2018-05-01T09:50:24.287

Reputation: 40 910

I did remove generate and generatetoaddress, it disables wallet mining, but i cannot generate blocks myself using litecoin-cli. Anyworkarounds?pbu 2018-05-01T20:17:54.380

1Don't remove generate and generatetoaddress for yourself. Remove it for the publicly available version of your coin.Andrew Chow 2018-05-01T20:39:10.783