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

Display entire hash #13

Open
jakecraige opened this issue Sep 15, 2017 · 2 comments
Open

Display entire hash #13

jakecraige opened this issue Sep 15, 2017 · 2 comments

Comments

@jakecraige
Copy link

Hi there,

Thanks for building this CLI. It's a really cool way to play around with a blockchain in a really interactive way.

Is there a way to display the full hash and previous hash values? I think it would be helpful if one could take the previous block and manually calculate the next hash to get a deeper understanding of how the blocks are generated, unfortunately the hash is clipped in the table display like so:

┌─────────────────────────────────────────┐
│               ⛓  Block #1               │
├────────────────────┬────────────────────┤
│ ⏮  Previous Hash   │ 0000018035a828da0… │
├────────────────────┼────────────────────┤
│ 📅  Timestamp       │ Fri, 15 Sep 2017   │
│                    │ 16:04:40 GMT       │
├────────────────────┼────────────────────┤
│ 📄  Data            │ hello              │
├────────────────────┼────────────────────┤
│ 📛  Hash            │ 00002ddfc3a099f0b… │
├────────────────────┼────────────────────┤
│ 🔨  Nonce           │ 86328              │
└────────────────────┴────────────────────┘
jakecraige added a commit to jakecraige/blockchain-cli that referenced this issue Sep 15, 2017
Because of the table column width, the hash was getting cut off which
hid some information that could be useful for someone experiementing
with this tool. By bumping the width of the value field up to 70. It
will display the full hash.

Before: 0000f96fdd0178807…
After: 00004556469a14cbbb0f6383a6bfd7c61aa6c0a8c78d4b9a08a8478bc060a73e

Closes 0xs34n#13
jakecraige added a commit to jakecraige/blockchain-cli that referenced this issue Sep 15, 2017
Because of the table column width, the hash was getting cut off which
hid some information that could be useful for someone experiementing
with this tool. By bumping the width of the value field up to 70. It
will display the full hash.

Before: 0000f96fdd0178807…
After: 00004556469a14cbbb0f6383a6bfd7c61aa6c0a8c78d4b9a08a8478bc060a73e

Closes 0xs34n#13
jakecraige added a commit to jakecraige/blockchain-cli that referenced this issue Sep 15, 2017
Because of the table column width, the hash was getting cut off which
hid some information that could be useful for someone experiementing
with this tool. By bumping the width of the value field up to 66. It
will display the full hash.

Before: 0000f96fdd0178807…
After: 00004556469a14cbbb0f6383a6bfd7c61aa6c0a8c78d4b9a08a8478bc060a73e

Closes 0xs34n#13
@0xs34n
Copy link
Owner

0xs34n commented Sep 24, 2017

@jakecraige Thank you for the kind words 😄

The hash was shorten so the table wouldn't look too overwhelming.

Maybe an option in the cli (--json) to display the JSON instead of the table, which would include the entire hash.

Or maybe an --long to show the entire hash for the table.

@gengxuelei
Copy link

@seanjameshan
So what should I do ?

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

No branches or pull requests

3 participants