Skip to content

fix json output for digest from RPC calls #744

@edwardmack

Description

@edwardmack

Results from RPC calls that contain header responses, the digest results are not formatted as a hex string, instead results are shown as raw bytes.

Expected Behavior

 "digest": {
            "logs": [
                "0x066175726120b33bc10f00000000",
                "0x05617572610101180b4de13f74e206324c2b168b72acec4ceb563d3788a51e9671170cd23d426a7d6c444e7e3aed5ad65ae9a07ce9d14317601dcce7a2660638ddfccc460a6882"
            ]
        },

Current Behavior

 "digest": [
            "AUJBQkUqwA/Tab4jGXRT1DnPUe+OPAzd1XbAYggcfYJpd9LGcrWY+ixNWMq6aoICoTqxBau2Cz4RZpLkSIsmnbAAtJEPtNDynEtllnhb+vfnMlbdSWDXEo/Ipb9tUWJHiuEH6g8AAAAAAAAAAG4HAAAAAAAA",
            "BEJBQkVaX75EtA7tF/9Vz2bcVHRjc0EHLnOSFrIPP+7VGc8We2GbQoYqkp7as+1PLyvnM3+Mh4gt+h1hbZEz2Kq3U7OH"
        ]

Possible Solution

Steps to Reproduce (for bugs)

  1. RPC call chain_getHeader or chain_getBlock

Context

Your Environment

  • Version used:
  • Commit hash:
  • Go Version:
  • Operating System and version (include distro if Linux):
  • Link to your project or reproducible gist:
  • I intend to submit a pull request to fix this issue: [ ]

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

Status

No status

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions