We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 016fd6e commit e5f59f1Copy full SHA for e5f59f1
src/rpc/mining.cpp
@@ -181,6 +181,10 @@ UniValue generatetoaddress(const JSONRPCRequest& request)
181
+ HelpExampleCli("generatetoaddress", "11 \"myaddress\"")
182
);
183
184
+ if (chainActive.Tip()->nHeight + 1 >= Params().GetConsensus().nPosStartHeight) {
185
+ throw JSONRPCError(RPC_INVALID_PARAMETER, "Unable to call generatetoaddress in the Proof-of-Stake phase");
186
+ }
187
+
188
int nGenerate = request.params[0].get_int();
189
uint64_t nMaxTries = 1000000;
190
if (!request.params[2].isNull()) {
0 commit comments