diff options
author | fanquake <fanquake@gmail.com> | 2021-11-17 09:55:19 +0800 |
---|---|---|
committer | fanquake <fanquake@gmail.com> | 2021-11-17 09:55:27 +0800 |
commit | b869a784ef2b259f14545bf6bd314fb58c36514b (patch) | |
tree | 65eccc89eccf72e862868e9d6200561e1a2be595 /doc | |
parent | 7be37ee850f4dea45d4979c7db25e9e42e342f54 (diff) | |
parent | 9b575f1c734c052b695ce921fb6412b22c18fdb4 (diff) |
Merge bitcoin/bitcoin#23522: Improve fs::PathToString documentation
9b575f1c734c052b695ce921fb6412b22c18fdb4 Improve fs::PathToString documentation (Russell Yanofsky)
Pull request description:
Add a developer note about avoiding `fs::PathToString` in RPCs, and improve some other `fs::PathToString` comments.
Developer note might have been useful in two recent review comments:
- https://github.com/bitcoin/bitcoin/pull/23398#discussion_r741585271
- https://github.com/bitcoin/bitcoin/pull/23155#discussion_r749824259
ACKs for top commit:
laanwj:
Documentation review ACK 9b575f1c734c052b695ce921fb6412b22c18fdb4
jamesob:
ACK https://github.com/bitcoin/bitcoin/pull/23522/commits/9b575f1c734c052b695ce921fb6412b22c18fdb4
prayank23:
ACK https://github.com/bitcoin/bitcoin/pull/23522/commits/9b575f1c734c052b695ce921fb6412b22c18fdb4
hebasto:
ACK 9b575f1c734c052b695ce921fb6412b22c18fdb4
shaavan:
ACK 9b575f1c734c052b695ce921fb6412b22c18fdb4
Tree-SHA512: b8b3ecb6208c3897241e4f24dcec64fe7cf091bc79388862cf5f4b315cb8e804939981c4bed4c81dbff99ec9f750bad99015d0f04890704ac9df63c2a6719b6d
Diffstat (limited to 'doc')
-rw-r--r-- | doc/developer-notes.md | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/doc/developer-notes.md b/doc/developer-notes.md index 7ff1d36442..1888897856 100644 --- a/doc/developer-notes.md +++ b/doc/developer-notes.md @@ -1254,6 +1254,12 @@ A few guidelines for introducing and reviewing new RPC interfaces: - *Rationale*: User-facing consistency. +- Use `fs::path::u8string()` and `fs::u8path()` functions when converting path + to JSON strings, not `fs::PathToString` and `fs::PathFromString` + + - *Rationale*: JSON strings are Unicode strings, not byte strings, and + RFC8259 requires JSON to be encoded as UTF-8. + Internal interface guidelines ----------------------------- |