Skip to content

Commit 7494175

Browse files
committed
[BDAP] Add spork check to colorcoin RPC command
1 parent 4100989 commit 7494175

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/bdap/rpcdomainentry.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -936,7 +936,6 @@ UniValue colorcoin(const JSONRPCRequest& request)
936936
"\nArguments:\n"
937937
"1. \"dynamicaddress\" (string) The destination wallet address\n"
938938
"2. \"amount\" (int) The amount in " + CURRENCY_UNIT + " to color. eg 0.1\n"
939-
"3. \"utxo list\" (string, optional) UTXO txids list seperated by commas\n"
940939
"\nResult:\n"
941940
" \"tx id\" (string) The transaction id for the coin coloring\n"
942941
"\nExamples:\n"
@@ -946,6 +945,9 @@ UniValue colorcoin(const JSONRPCRequest& request)
946945

947946
EnsureWalletIsUnlocked();
948947

948+
if (!sporkManager.IsSporkActive(SPORK_30_ACTIVATE_BDAP))
949+
throw JSONRPCError(RPC_BDAP_SPORK_INACTIVE, strprintf("Can not use the colorcoin RPC command until the BDAP spork is active."));
950+
949951
if (!pwalletMain)
950952
throw JSONRPCError(RPC_WALLET_ERROR, strprintf("Error accessing wallet."));
951953

@@ -991,7 +993,7 @@ static const CRPCCommand commands[] =
991993
{ "bdap", "addgroup", &addgroup, true, {"account id", "common name", "registration days"} },
992994
{ "bdap", "getgroupinfo", &getgroupinfo, true, {"account id"} },
993995
{ "bdap", "mybdapaccounts", &mybdapaccounts, true, {} },
994-
{ "bdap", "colorcoin", &colorcoin, true, {"dynamicaddress", "amount", "utxo list"} },
996+
{ "bdap", "colorcoin", &colorcoin, true, {"dynamicaddress", "amount"} },
995997
#endif //ENABLE_WALLET
996998
{ "bdap", "makekeypair", &makekeypair, true, {"prefix"} },
997999
};

0 commit comments

Comments
 (0)