@@ -582,7 +582,7 @@ UniValue dhtputmessages(const JSONRPCRequest& request)
582
582
HelpExampleRpc (" dhtputmessages" , " " ));
583
583
584
584
if (!sporkManager.IsSporkActive (SPORK_30_ACTIVATE_BDAP))
585
- throw std::runtime_error ( " BDAP_DHT_RPC_ERROR: ERRCODE: 3000 - " + _ (" Can not use DHT until BDAP spork is active." ));
585
+ throw JSONRPCError (RPC_BDAP_SPORK_INACTIVE, strprintf (" Can not use the DHT until the BDAP spork is active." ));
586
586
587
587
UniValue result (UniValue::VOBJ);
588
588
@@ -637,7 +637,7 @@ UniValue dhtgetmessages(const JSONRPCRequest& request)
637
637
HelpExampleRpc (" dhtgetmessages" , " " ));
638
638
639
639
if (!sporkManager.IsSporkActive (SPORK_30_ACTIVATE_BDAP))
640
- throw std::runtime_error ( " BDAP_DHT_RPC_ERROR: ERRCODE: 3000 - " + _ (" Can not use DHT until BDAP spork is active." ));
640
+ throw JSONRPCError (RPC_BDAP_SPORK_INACTIVE, strprintf (" Can not use the DHT until the BDAP spork is active." ));
641
641
642
642
UniValue result (UniValue::VOBJ);
643
643
@@ -1227,7 +1227,7 @@ UniValue dht_rpc(const JSONRPCRequest& request)
1227
1227
if (strCommand == " getmutable" || strCommand == " putmutable" ||
1228
1228
strCommand == " getrecord" || strCommand == " putrecord" || strCommand == " clearrecord" ||
1229
1229
strCommand == " getlinkrecord" || strCommand == " putlinkrecord" || strCommand == " clearlinkrecord" || strCommand == " getalllinkrecords" ||
1230
- strCommand == " status" )
1230
+ strCommand == " status" || strCommand == " reannounce " || strCommand == " events " )
1231
1231
{
1232
1232
if (!sporkManager.IsSporkActive (SPORK_30_ACTIVATE_BDAP))
1233
1233
throw JSONRPCError (RPC_BDAP_SPORK_INACTIVE, strprintf (" Can not use the DHT until the BDAP spork is active." ));
0 commit comments