This complements #7507, allowing external scripts to take over the function of the internal setgenerate miner.
Make the generate RPC call function for non-regtest #7663
pull sipa wants to merge 1 commits into bitcoin:master from sipa:generatenonreg changing 2 files +18 −10-
sipa commented at 9:31 PM on March 9, 2016: member
-
Make the generate RPC call function for non-regtest 8a253b342c
-
jonasschnelli commented at 8:02 AM on March 10, 2016: contributor
utACK. nit: should we not exclude mainnet from
generate? - jonasschnelli added the label Mining on Mar 10, 2016
-
sipa commented at 8:57 AM on March 10, 2016: member
At best I think we can check the difficulty, and fail if it's over (say) 400, which on any CPU thread would take over a day.
-
jonasschnelli commented at 9:09 AM on March 10, 2016: contributor
400, which on any CPU thread would take over a day.
This would require adjustment over time (moore's law),.. but fine for me, it's anyways a nitpick.
-
sipa commented at 9:17 AM on March 10, 2016: member
Ok make it 1000000.
Or I just add a warning to the RPC help saying that using it on mainnet is pointless.
-
jonasschnelli commented at 9:20 AM on March 10, 2016: contributor
+1 for the warning. I guess there will be some bitcoin-novice users that type in
generate 1into the GUI console window and wait until "they have mined a couple of bitcoin" and I don't want Issues like "generate 1takes ages to generate bitcoins". :-) -
sipa commented at 9:50 AM on March 10, 2016: member
Note that the RPC will return after by default 1000000 iterations (which is typically less than a second), with however many blocks were found in that time.
-
laanwj commented at 7:44 AM on March 11, 2016: member
Concept ACK
with however many blocks were found in that time.
But never more than the number of blocks given as first argument, I hope?
-
sipa commented at 11:19 AM on March 11, 2016: member
Indeed. I updated the help text to clarify that.
- laanwj merged this on Mar 14, 2016
- laanwj closed this on Mar 14, 2016
- laanwj referenced this in commit c87f51e55b on Mar 14, 2016
-
laanwj commented at 10:36 AM on March 14, 2016: member
We should probably mention this in the 0.13 release notes
- codablock referenced this in commit 34e2f31daa on Sep 16, 2017
- codablock referenced this in commit e274120847 on Sep 19, 2017
- codablock referenced this in commit efa690302a on Dec 9, 2017
- codablock referenced this in commit fb4ec255c6 on Dec 19, 2017
- thephez referenced this in commit 923d6a4550 on Feb 22, 2018
- thephez referenced this in commit ded0b9a8ce on Feb 27, 2018
- thephez referenced this in commit 39978ec641 on Jun 11, 2018
- thephez referenced this in commit a7bbd654ec on Jun 11, 2018
- MarcoFalke locked this on Sep 8, 2021