diff options
author | Bezdrighin <mbbezdri@3c22fbe8ae1b.ant.amazon.com> | 2021-01-03 01:45:25 +0100 |
---|---|---|
committer | Bezdrighin <mbbezdri@3c22fbe8ae1b.ant.amazon.com> | 2021-01-24 02:44:53 +0100 |
commit | 8f0b64fb513e8c6cdd1f115856100a4ef5afe23e (patch) | |
tree | 25b5ca06023a3b6b633515962a952ebc94c538a0 /src/key_io.h | |
parent | 32b191fb66e644c690c94cbfdae6ddbc754769d7 (diff) |
Better error messages for invalid addresses
This commit addresses #20809.
We add an additional 'error' property in the result of 'validateaddress' in case the address is not valid that gives a short description of why the address in invalid. We also change the error message returned by 'getaddressinfo' in case the address is invalid.
Diffstat (limited to 'src/key_io.h')
-rw-r--r-- | src/key_io.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/key_io.h b/src/key_io.h index d80c08f49c..bd81f7847e 100644 --- a/src/key_io.h +++ b/src/key_io.h @@ -23,6 +23,7 @@ std::string EncodeExtPubKey(const CExtPubKey& extpubkey); std::string EncodeDestination(const CTxDestination& dest); CTxDestination DecodeDestination(const std::string& str); +CTxDestination DecodeDestination(const std::string& str, std::string& error_msg); bool IsValidDestinationString(const std::string& str); bool IsValidDestinationString(const std::string& str, const CChainParams& params); |