mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-16 13:01:19 +02:00
rpc: Improve addnode remove command error message
This also adds test coverage for the remove command which was uncovered before.
This commit is contained in:
parent
f306384f5a
commit
a51d0ad2de
2 changed files with 8 additions and 1 deletions
|
|
@ -276,7 +276,7 @@ static UniValue addnode(const JSONRPCRequest& request)
|
|||
else if(strCommand == "remove")
|
||||
{
|
||||
if(!node.connman->RemoveAddedNode(strNode))
|
||||
throw JSONRPCError(RPC_CLIENT_NODE_NOT_ADDED, "Error: Node has not been added.");
|
||||
throw JSONRPCError(RPC_CLIENT_NODE_NOT_ADDED, "Error: Node could not be removed. It has not been added previously.");
|
||||
}
|
||||
|
||||
return NullUniValue;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue