HomePhabricator

rpc: Improve addnode remove command error message

Description

rpc: Improve addnode remove command error message

Summary:
This also adds test coverage for the remove command which was uncovered before.

PR description:

The addnode RPC with the remove command parameter is used to remove a node from the "added nodes". It did not have test coverage and in case of failure to remove the node it responded with the confusing message "Error: Node has not been added.".
This PR adds test coverage as well as changes the error message to something that makes sense.

This is a backport of core#19696

Test Plan: ninja all check-all

Reviewers: #bitcoin_abc, majcosta

Reviewed By: #bitcoin_abc, majcosta

Differential Revision: https://reviews.bitcoinabc.org/D10072

Details

Provenance
Fabian Jahr <fjahr@protonmail.com>Authored on Aug 10 2020, 22:01
PiRKCommitted on Sep 8 2021, 16:30
PiRKPushed on Sep 8 2021, 16:30
Reviewer
Restricted Project
Differential Revision
D10072: rpc: Improve addnode remove command error message
Parents
rABCae4f7c1674cf: Cap listsinceblock target_confirmations param
Branches
Unknown
Tags
Unknown