HomePhabricator

getblockchaininfo: make bip9_softforks an object, not an array.
85c807c9ead3Unpublished

Unpublished Commit ยท Learn More

Repository Importing: This repository is still importing.

Description

getblockchaininfo: make bip9_softforks an object, not an array.

We can't change "softforks", but it seems far more logical to use tags
in an object rather than using an "id" field in an array.

For example, to get the csv status before, you need to iterate the
array to find the entry with 'id' field equal to "csv":

jq '.bip9_softforks | map(select(.id == "csv"))[] | .status'

Now:

jq '.bip9_softforks.csv.status'

There is no issue with fork names being incompatible with JSON tags,
since we're selecting them ourselves.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>

Details

Provenance
Rusty Russell <rusty@rustcorp.com.au>Authored on Apr 12 2016, 06:14
deadalnixPushed on May 14 2017, 22:04
Parents
rABC934f2b5e7693: Merge #7858: Add jl2012 public key for gitian build
Branches
Unknown
Tags
Unknown

Event Timeline

Rusty Russell <rusty@rustcorp.com.au> committed rABC85c807c9ead3: getblockchaininfo: make bip9_softforks an object, not an array. (authored by Rusty Russell <rusty@rustcorp.com.au>).Apr 13 2016, 07:23