hyperledger / hyperledger/fabric-x

fxconfig namespace list displays policies as raw hex instead of human-readable strings

Open
#195 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Go
Stars
64
Forks
80
Avg merge
1d 22h
Merged PRs (30d)
15

Description

in ```list.go```
Image

The fxconfig namespace list command currently outputs namespace policies as raw hexadecimal bytes, making it impossible to understand the endorsement policy without manual decoding. A parsePolicy function was stubbed out in internal/app/list.go but left entirely commented out with a // TODO: some pretty print would be beautiful note and *left for future implementation*

Expected behavior:

we need to implement ```parsePolicy``` with proper error handling, add ```signaturePolicyToString``` to recursively decode the ```NOutOf``` policy tree, wire ```PolicyStr``` into ```NamespaceQueryResult```
Then we'd have to update ```namespace_list.go``` to print ```p.PolicyStr``` instead of the ```%x p.Policy```.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.