diff options
author | Andrew Chow <github@achow101.com> | 2023-11-02 15:37:51 -0400 |
---|---|---|
committer | Andrew Chow <github@achow101.com> | 2023-11-02 15:45:13 -0400 |
commit | 9b68c9b85efebfa23daec6471b87e9cbb514a006 (patch) | |
tree | ca430cb0545842ca53b7facd3897a3850bfefe52 /src/test | |
parent | 5f886221914fc4cb8a606f1b74aab2cddd8c0c84 (diff) | |
parent | bb91131d545d986aab81c4bb13676c4520169259 (diff) |
Merge bitcoin/bitcoin#28172: refactor: use string_view for passing string literals to Parse{Hash,Hex}
bb91131d545d986aab81c4bb13676c4520169259 doc: remove out-of-date external link in src/util/strencodings.h (Jon Atack)
7d494a48ddf4248ef3b1753b6e7f2eeab3a8ecb7 refactor: use string_view to pass string literals to Parse{Hash,Hex} (Jon Atack)
Pull request description:
as `string_view` is optimized to be trivially copiable, whereas the current code creates a `std::string` copy at each call.
These utility methods are called by quite a few RPCs and tests, as well as by each other.
```
$ git grep "ParseHashV\|ParseHashO\|ParseHexV\|ParseHexO" | wc -l
61
```
Also remove an out-of-date external link.
ACKs for top commit:
jonatack:
Rebased per `git range-diff c9273f6 b94581a bb91131` for an include header from the merge of https://github.com/bitcoin/bitcoin/pull/28230. Should be trivial to re-ACK.
maflcko:
lgtm ACK bb91131d545d986aab81c4bb13676c4520169259
ns-xvrn:
ACK https://github.com/bitcoin/bitcoin/commit/bb91131d545d986aab81c4bb13676c4520169259
achow101:
ACK bb91131d545d986aab81c4bb13676c4520169259
brunoerg:
crACK bb91131d545d986aab81c4bb13676c4520169259
Tree-SHA512: 9734fe022c9e43fd93c23a917770d332dbbd3132c80a234059714c32faa6469391e59349954749fc86c4ef0b18d5fd99bf8f4b7b82d9f799943799c1253272ae
Diffstat (limited to 'src/test')
0 files changed, 0 insertions, 0 deletions