diff options
author | Russell Yanofsky <russ@yanofsky.org> | 2020-04-02 08:35:10 -0400 |
---|---|---|
committer | Russell Yanofsky <russ@yanofsky.org> | 2020-04-02 08:35:10 -0400 |
commit | 01a3392b1b778fa4fcf568013326d6ea1de4fb3b (patch) | |
tree | 4a498b5cc8d1121e9ab7276fc335b778043cd8a2 /src/util | |
parent | 0660119ac372c2863d14060ac1bc9bc243771f94 (diff) |
Drop bitcoin-wallet dependency on libevent
Don't require urlDecode function in wallet code since urlDecode implementation
currently uses libevent. Just call urlDecode indirectly though URL_DECODE
function pointer constant if available.
In bitcoind and bitcoin-qt, URL_DECODE is implemented and used to interpret RPC
wallet requests. In bitcoin-wallet, URL_DECODE is null to avoid depending on
libevent.
Diffstat (limited to 'src/util')
-rw-r--r-- | src/util/url.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/util/url.h b/src/util/url.h index e9ea2ab765..be9f1c9e8a 100644 --- a/src/util/url.h +++ b/src/util/url.h @@ -7,6 +7,8 @@ #include <string> -std::string urlDecode(const std::string &urlEncoded); +using UrlDecodeFn = std::string(const std::string& url_encoded); +UrlDecodeFn urlDecode; +extern UrlDecodeFn* const URL_DECODE; #endif // BITCOIN_UTIL_URL_H |