Change bitcoin address in RPC help message to an invalid address, so people don't accidentally send coins there (like I did).
Change bitcoin address in RPC help message #9865
pull marijnfs wants to merge 1 commits into bitcoin:master from marijnfs:master changing 2 files +19 −19-
marijnfs commented at 1:03 PM on February 26, 2017: contributor
-
Change bitcoin address in RPC helpaddress to an invalid address, so people don't accidentally send coins there (like I did). 83ac719d34
-
laanwj commented at 1:21 PM on February 26, 2017: member
Concept ACK. Hope you didn't lose a lot on this, it's not one of our addresses :(
Implementation-nit: please define a constant for this.
- laanwj added the label RPC/REST/ZMQ on Feb 26, 2017
-
MarcoFalke commented at 1:51 PM on February 26, 2017: member
I think the address was first mentioned in #3184.
-
in src/rpc/misc.cpp:None in 83ac719d34
346 | @@ -347,11 +347,11 @@ UniValue verifymessage(const JSONRPCRequest& request) 347 | "\nUnlock the wallet for 30 seconds\n" 348 | + HelpExampleCli("walletpassphrase", "\"mypassphrase\" 30") + 349 | "\nCreate the signature\n" 350 | - + HelpExampleCli("signmessage", "\"1D1ZrZNe3JUo7ZycKEYQQiQAWd9y54F4XZ\" \"my message\"") + 351 | + + HelpExampleCli("signmessage", "\"1D1ZrZNe3JUo7ZycKEYQQiQAWd9y54F4XX\" \"my message\"") +
MarcoFalke commented at 1:51 PM on February 26, 2017:You could use
DummyAddress(Params())instead to get an invalid address.
marijnfs commented at 7:23 PM on February 26, 2017:Interesting. Though, I wanted to make the minimal change possible (I changed one letter) to keep things simpler. Do you think calling another function is necessary for this? It would be confusing if the address changes on each run for example.
laanwj commented at 10:57 AM on February 28, 2017:I think this is a good fix for 0.14 actually. We can consider a cleaner solution later.
JeremyRubin commented at 8:49 PM on February 26, 2017: contributorWhat if someone is trying to learn something and uses one of the documentation addresses and gets "invalid address" and thinks something is wrong with their node/service? I think I prefer having a valid address in documentation for this reason.
My proposal to fix it would be that it uses an address that is owned by the wallet in question (specifically marked for help output), if the node has a wallet. That way any command that a user tries running from the help output without understanding could actually do something.
laanwj commented at 9:15 AM on February 27, 2017: memberI strongly prefer using an invalid address here. You are not supposed to copy/paste the address, it can happen and it's better if it fails. Prevents a lot of panic "where did I just send to".
Using an address from the current wallet is a fair suggestion, but many of these calls are not coupled to the wallet at all, and shouldn't be.
JeremyRubin commented at 9:21 AM on February 27, 2017: contributoryeah on further thought failing is clearly better, even if it confuses someone once.
laanwj added this to the milestone 0.14.0 on Feb 28, 2017laanwj commented at 10:58 AM on February 28, 2017: memberACK 83ac719
laanwj merged this on Feb 28, 2017laanwj closed this on Feb 28, 2017laanwj referenced this in commit 30bdcfca2b on Feb 28, 2017laanwj referenced this in commit 289204fbe0 on Feb 28, 2017codablock referenced this in commit 39f08b6e66 on Jan 26, 2018andvgal referenced this in commit 17d522bc1f on Jan 6, 2019CryptoCentric referenced this in commit 8c58b619f6 on Feb 27, 2019DrahtBot locked this on Feb 15, 2022
This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-04-13 15:15 UTC
More mirrored repositories can be found on mirror.b10c.me