New RPC command disconnectnode#6271
New RPC command disconnectnode#6271Alex-van-der-Peet wants to merge 4 commits intobitcoin:masterfrom
Conversation
src/rpcnet.cpp
Outdated
There was a problem hiding this comment.
I think it should raise an error when the node is not found. e.g.
if (pNode == NULL)
throw JSONRPCError(RPC_NOT_FOUND, "Node not found in connected nodes");This makes it possible to see if an operation actually happened.
There was a problem hiding this comment.
+1 @laanwj
I would also remove the 'strNode' round trip and directly add params[0].get_str() within FindNode()
|
utACK |
|
Tested ACK. |
|
@jonasschelli Just to avoid git confusion, you're asking me to add a source in git for your branch, merge the changes into mine and push it back? That's ok, I won't see my dev machine untli Monday though. |
|
@Alex-van-der-Peet yes, except you should use |
|
@Alex-van-der-Peet: right. You need to add my remote |
also includes some whitespace fixes
There was a problem hiding this comment.
@jonasschnelli
I don't see the connection to add these tests in httpbasics.py (even renaming it). Let's add a seperate test script for (upcoming) RPC node disconnect/ban/etc handling?
There was a problem hiding this comment.
I was trying to save some precious test time because another test will at least add another chain init and maybe mining of 100blocks on the top.
But right. A separate test could make sense if we look what else could get in there. Will do so.
There was a problem hiding this comment.
Saving time is not worth it at the expense of sanity :)
Maybe the chain init can be avoided for tests like this that don't need a chain?
In any case - httpbasics will become more extensive when we switch HTTP servers, so keeping the just-HTTP tests in a script of their own makes sense.
|
@jonasschnelli To make it easier for our new contributor I'm going to go ahead and merge this without the tests, we can add those in a separate pull (or as part of #6158, even better) |
60dbe73 New RPC command disconnectnode (Alex van der Peet)
|
Merged via 754aae5 |
Bitcoin 0.12 RPC PRs 1 Cherry-picked from the following upstream PRs: - bitcoin/bitcoin#6266 - bitcoin/bitcoin#6257 - bitcoin/bitcoin#6271 - bitcoin/bitcoin#6158 - bitcoin/bitcoin#6307 - bitcoin/bitcoin#6290 - bitcoin/bitcoin#6262 - bitcoin/bitcoin#6088 - bitcoin/bitcoin#6339 - bitcoin/bitcoin#6299 (partial, remainder in #2099) - bitcoin/bitcoin#6350 - bitcoin/bitcoin#6247 - bitcoin/bitcoin#6362 - bitcoin/bitcoin#5486 - bitcoin/bitcoin#6417 - bitcoin/bitcoin#6398 (partial, remainder was included in #1950) - bitcoin/bitcoin#6444 - bitcoin/bitcoin#6456 (partial, remainder was included in #2082) - bitcoin/bitcoin#6380 - bitcoin/bitcoin#6970 Part of #2074.
Original issue #2729 was implemented in pull request #6259. Based on the discussion there, this pull request adds a new RPC command disconnectnode. Tested on Ubuntu 14.04 with bitcoin-cli, works.