@@ -1024,6 +1024,10 @@ UniValue getnewblockhex(const JSONRPCRequest& request)
1024
1024
}
1025
1025
}.ToString ());
1026
1026
1027
+ if (!g_con_elementsmode) {
1028
+ throw JSONRPCError (RPC_INVALID_PARAMETER, " This RPC cannot be used in bitcoin compatibility mode. Note: `-regtest` is Bitcoin's regtest mode, instead try `-chain=<custom chain name>`" );
1029
+ }
1030
+
1027
1031
int required_wait = !request.params [0 ].isNull () ? request.params [0 ].get_int () : 0 ;
1028
1032
if (required_wait < 0 ) {
1029
1033
throw JSONRPCError (RPC_INVALID_PARAMETER, " min_tx_age must be non-negative." );
@@ -1198,6 +1202,10 @@ UniValue getcompactsketch(const JSONRPCRequest& request)
1198
1202
}
1199
1203
}.ToString ());
1200
1204
1205
+ if (!g_con_elementsmode) {
1206
+ throw JSONRPCError (RPC_INVALID_PARAMETER, " This RPC cannot be used in bitcoin compatibility mode. Note: `-regtest` is Bitcoin's regtest mode, instead try `-chain=<custom chain name>`" );
1207
+ }
1208
+
1201
1209
CBlock block;
1202
1210
std::vector<unsigned char > block_bytes (ParseHex (request.params [0 ].get_str ()));
1203
1211
CDataStream ssBlock (block_bytes, SER_NETWORK, PROTOCOL_VERSION);
@@ -1236,6 +1244,10 @@ UniValue consumecompactsketch(const JSONRPCRequest& request)
1236
1244
}
1237
1245
}.ToString ());
1238
1246
1247
+ if (!g_con_elementsmode) {
1248
+ throw JSONRPCError (RPC_INVALID_PARAMETER, " This RPC cannot be used in bitcoin compatibility mode. Note: `-regtest` is Bitcoin's regtest mode, instead try `-chain=<custom chain name>`" );
1249
+ }
1250
+
1239
1251
UniValue ret (UniValue::VOBJ);
1240
1252
1241
1253
std::vector<unsigned char > compact_block_bytes (ParseHex (request.params [0 ].get_str ()));
@@ -1305,6 +1317,10 @@ UniValue consumegetblocktxn(const JSONRPCRequest& request)
1305
1317
}
1306
1318
}.ToString ());
1307
1319
1320
+ if (!g_con_elementsmode) {
1321
+ throw JSONRPCError (RPC_INVALID_PARAMETER, " This RPC cannot be used in bitcoin compatibility mode. Note: `-regtest` is Bitcoin's regtest mode, instead try `-chain=<custom chain name>`" );
1322
+ }
1323
+
1308
1324
CBlock block;
1309
1325
std::vector<unsigned char > block_bytes (ParseHex (request.params [0 ].get_str ()));
1310
1326
CDataStream ssBlock (block_bytes, SER_NETWORK, PROTOCOL_VERSION);
@@ -1350,6 +1366,10 @@ UniValue finalizecompactblock(const JSONRPCRequest& request)
1350
1366
}
1351
1367
}.ToString ());
1352
1368
1369
+ if (!g_con_elementsmode) {
1370
+ throw JSONRPCError (RPC_INVALID_PARAMETER, " This RPC cannot be used in bitcoin compatibility mode. Note: `-regtest` is Bitcoin's regtest mode, instead try `-chain=<custom chain name>`" );
1371
+ }
1372
+
1353
1373
// Compact block
1354
1374
std::vector<unsigned char > compact_block_bytes (ParseHex (request.params [0 ].get_str ()));
1355
1375
CDataStream ssCompactBlock (compact_block_bytes, SER_NETWORK, PROTOCOL_VERSION);
@@ -1404,6 +1424,10 @@ UniValue testproposedblock(const JSONRPCRequest& request)
1404
1424
}
1405
1425
}.ToString ());
1406
1426
1427
+ if (!g_con_elementsmode) {
1428
+ throw JSONRPCError (RPC_INVALID_PARAMETER, " This RPC cannot be used in bitcoin compatibility mode. Note: `-regtest` is Bitcoin's regtest mode, instead try `-chain=<custom chain name>`" );
1429
+ }
1430
+
1407
1431
CBlock block;
1408
1432
if (!DecodeHexBlk (block, request.params [0 ].get_str ()))
1409
1433
throw JSONRPCError (RPC_DESERIALIZATION_ERROR, " Block decode failed" );
0 commit comments