Log string header_hash on long validation warnings (#17304)

* Log string header_hash on long validation warnings

We are logging the binary form of the header hash in the "WARNING Block validation time" is slow log entry. Instead log the human readable header hash.

* Catch another incorrect header_hash log event

* revert last commit

* revert -gui pin

* use .hex() instead
This commit is contained in:
Gene Hoffman 2024-01-11 18:46:35 -08:00 committed by GitHub
parent a053e2f120
commit fb2e8929cb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1808,7 +1808,7 @@ class FullNode:
f"pre_validation time: {pre_validation_time:0.2f} seconds, " f"pre_validation time: {pre_validation_time:0.2f} seconds, "
f"post-process time: {post_process_time:0.2f} seconds, " f"post-process time: {post_process_time:0.2f} seconds, "
f"cost: {block.transactions_info.cost if block.transactions_info is not None else 'None'}" f"cost: {block.transactions_info.cost if block.transactions_info is not None else 'None'}"
f"{percent_full_str} header_hash: {header_hash} height: {block.height}", f"{percent_full_str} header_hash: {header_hash.hex()} height: {block.height}",
) )
# this is not covered by any unit tests as it's essentially test code # this is not covered by any unit tests as it's essentially test code