aboutsummaryrefslogtreecommitdiff
path: root/src/.clang-format
diff options
context:
space:
mode:
authorfanquake <fanquake@gmail.com>2021-10-19 16:02:22 +0800
committerfanquake <fanquake@gmail.com>2021-10-19 16:05:39 +0800
commit4b24f6bbb51a40e77fcc7f1010eb14187567bc9a (patch)
tree96a4a8d370fabdd5c7b44b3358753842b6d00b65 /src/.clang-format
parent927c2c4f877e23dd009a3ea15c2c1c6308354c33 (diff)
parent53c9fa9e6253ea89ba1057b35e018ad1a25fb97e (diff)
Merge bitcoin/bitcoin#23302: tracing: drop GetHash().ToString() argument from the `validation:block_connected` tracepoint
53c9fa9e6253ea89ba1057b35e018ad1a25fb97e tracing: drop block_connected hash.toString() arg (0xb10c) Pull request description: The tracepoint `validation:block_connected` was introduced in #22006. The first argument was the hash of the connected block as a pointer to a C-like String. The last argument passed the hash of the connected block as a pointer to 32 bytes. The hash was only passed as string to allow `bpftrace` scripts to print the hash. It was (incorrectly) assumed that `bpftrace` cannot hex-format and print the block hash given only the hash as bytes. The block hash can be printed in `bpftrace` by calling `printf("%02x")` for each byte of the hash in an `unroll () {...}`. By starting from the last byte of the hash, it can be printed in big-endian (the block-explorer format). ```C $p = $hash + 31; unroll(32) { $b = *(uint8*)$p; printf("%02x", $b); $p -= 1; } ``` See also: #22902 (comment) This is a breaking change to the block_connected tracepoint API, however this tracepoint has not yet been included in a release. ACKs for top commit: laanwj: Concept and code review ACK 53c9fa9e6253ea89ba1057b35e018ad1a25fb97e jb55: ACK 53c9fa9e6253ea89ba1057b35e018ad1a25fb97e Tree-SHA512: f1b9e4e0ee45aae892e8bf38e04b5ee5fbc643d6e7e27d011b829ed8701dacf966a99b7c877c46cca8666b894a375633e62582c552c8203614c6f2b9c4087585
Diffstat (limited to 'src/.clang-format')
0 files changed, 0 insertions, 0 deletions