We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent e58ff43 commit 665085fCopy full SHA for 665085f
src/rpc/mining.cpp
@@ -43,6 +43,7 @@
43
44
#include <memory>
45
#include <stdint.h>
46
+#include <variant>
47
48
using node::BlockAssembler;
49
using node::CBlockTemplate;
@@ -285,6 +286,9 @@ static RPCHelpMan generatetoaddress()
285
286
if (!IsValidDestination(destination)) {
287
throw JSONRPCError(RPC_INVALID_ADDRESS_OR_KEY, "Error: Invalid address");
288
}
289
+ if (std::get_if<V0SilentPaymentDestination>(&destination)) {
290
+ throw JSONRPCError(RPC_INVALID_ADDRESS_OR_KEY, "Error: Cannot pay to Silent Payment Output in Coinbase transactions");
291
+ }
292
293
NodeContext& node = EnsureAnyNodeContext(request.context);
294
Mining& miner = EnsureMining(node);
0 commit comments