Disallow issuance calls in bitcoin mode

This commit is contained in:
Gregory Sanders 2019-05-20 07:45:42 -04:00 committed by Steven Roose
parent 427903dd97
commit 434067a229
No known key found for this signature in database
GPG key ID: 2F2A88D7F8D68E87

View file

@ -5741,6 +5741,10 @@ UniValue issueasset(const JSONRPCRequest& request)
LOCK2(cs_main, pwallet->cs_wallet);
if (!g_con_elementsmode) {
throw JSONRPCError(RPC_TYPE_ERROR, "Issuance can only be done on elements-style chains. Note: `-regtest` is Bitcoin's regtest mode, instead try `-chain=<custom chain name>`");
}
CAmount nAmount = AmountFromValue(request.params[0]);
CAmount nTokens = AmountFromValue(request.params[1]);
if (nAmount == 0 && nTokens == 0) {
@ -5828,6 +5832,10 @@ UniValue reissueasset(const JSONRPCRequest& request)
LOCK2(cs_main, pwallet->cs_wallet);
if (!g_con_elementsmode) {
throw JSONRPCError(RPC_TYPE_ERROR, "Issuance can only be done on elements-style chains. Note: `-regtest` is Bitcoin's regtest mode, instead try `-chain=<custom chain name>`");
}
std::string assetstr = request.params[0].get_str();
CAsset asset = GetAssetFromString(assetstr);