Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

misc: print hash as an hex string in logs #383

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

undercover-cactus
Copy link
Contributor

@undercover-cactus undercover-cactus commented Feb 26, 2025

In this PR we improve logs so it would print hash as hex string. It will help with readability and keep consistent how we represent file key value or fingerprint in other places (like in polkadotjs).

It will also help in integration testing when waiting for docker logs to validate behaviors.

Before :

File upload complete. Peer PeerId("12D3KooWSUvz8QM5X4tfAaSLErAZjR2puojo16pULBHyqTMGKtNV") has the entire file Fingerprint([43, 131, 185, 114, 230, 63, 82, 171, 192, 212, 20, 108, 74, 238, 31, 30, 200, 170, 142, 39, 77, 42, 209, 182, 38, 82, 148, 70, 218, 147, 115, 108])

After :

File upload complete. Peer PeerId("12D3KooWSUvz8QM5X4tfAaSLErAZjR2puojo16pULBHyqTMGKtNV") has the entire file 0x2b83b972e63f52abc0d4146c4aee1f1ec8aa8e274d2ad1b626529446da93736c

Copy link
Contributor

@snowmead snowmead left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice improvement!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants