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

shorten MN outpoint output from getvotes #1871

Merged
merged 1 commit into from
Jan 31, 2018

Conversation

nmarley
Copy link

@nmarley nmarley commented Jan 25, 2018

This would change the output of getvotes family of RPC commands from something like (example):

"64c9d5a7aed64fddf4f69390b4aec921938238a9efb4e81dab878d74234e1340": "CTxIn(COutPoint(a8b2a88c97682f213d3f71ffa2d0ae2e13220745c7fa7e2b93c2aff0824db4ff, 0), scriptSig=):1511282274:NO:FUNDING"

... to this:

"64c9d5a7aed64fddf4f69390b4aec921938238a9efb4e81dab878d74234e1340": "a8b2a88c97682f213d3f71ffa2d0ae2e13220745c7fa7e2b93c2aff0824db4ff-0:1511282274:NO:FUNDING"

This would make it easier to parse and remove superfluous chars. This has already been done for masternode status, so this change is following up on some remaining bits.

@UdjinM6 UdjinM6 added this to the 12.3 milestone Jan 25, 2018
Copy link

@UdjinM6 UdjinM6 left a comment

Choose a reason for hiding this comment

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

utACK

@codablock
Copy link

Any reason we don't use json in such commands?

@nmarley
Copy link
Author

nmarley commented Jan 25, 2018

The getvotes and getcurrentvotes commands do actually output JSON. The example that I posted is an excerpt, just showing one vote to show the differences this change would bring.

If you're asking why it's not broken out into separate fields and colon-delimited instead, my guess is that it's probably just simpler for serializing in the toString() method. But @UdjinM6 would probably know the history better than I would.

@UdjinM6
Copy link

UdjinM6 commented Jan 26, 2018

I don't remember the exact reason for not using json. I guess it's just a legacy way of presenting things to make them somewhat readable in cli output by keeping them in one string/line per item form.

@UdjinM6 UdjinM6 merged commit 5a5f618 into dashpay:develop Jan 31, 2018
@nmarley nmarley deleted the shorten-outpoint-getvotes branch March 25, 2018 22:49
andvgal pushed a commit to energicryptocurrency/gen2-energi that referenced this pull request Jan 6, 2019
CryptoCentric pushed a commit to absolute-community/absolute that referenced this pull request Feb 27, 2019
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