Skip to content

Commit

Permalink
Better solution
Browse files Browse the repository at this point in the history
  • Loading branch information
patrick-ogrady committed Aug 8, 2020
1 parent db1da2b commit 57b336d
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 22 deletions.
9 changes: 1 addition & 8 deletions api.json
Original file line number Diff line number Diff line change
Expand Up @@ -1343,19 +1343,12 @@
}
},
"BlockResponse": {
"description":"A BlockResponse includes a fully-populated block or a partially-populated block with a list of other transactions to fetch (other_transactions).",
"description":"A BlockResponse includes a fully-populated block or a partially-populated block with a list of other transactions to fetch (other_transactions). As a result of the consensus algorithm of some blockchains, blocks can be omitted (i.e. certain block indexes can be skipped). If a query for one of these omitted indexes is made, the response should not include a `Block` object. It is VERY important to note that blocks MUST still form a canonical, connected chain of blocks where each block has a unique index. In other words, the `PartialBlockIdentifier` of a block after an omitted block should reference the last non-omitted block.",
"type":"object",
"required": [
"block_omitted"
],
"properties": {
"block": {
"$ref":"#/components/schemas/Block"
},
"block_omitted": {
"description":"As a result of the consensus algorithm of some blockchains, blocks can be omitted (i.e. certain block indexes can be skipped). If a query for one of these omitted indexes is made, the response should return `true` for this field. It is VERY important to note that blocks MUST still form a canonical, connected chain of blocks where each block has a unique index. In other words, the `PartialBlockIdentifier` of a block after an omitted block should reference the last non-omitted block.",
"type":"boolean"
},
"other_transactions": {
"description":"Some blockchains may require additional transactions to be fetched that weren't returned in the block response (ex: block only returns transaction hashes). For blockchains with a lot of transactions in each block, this can be very useful as consumers can concurrently fetch all transactions returned.",
"type":"array",
Expand Down
24 changes: 10 additions & 14 deletions api.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -700,24 +700,20 @@ components:
description: |
A BlockResponse includes a fully-populated block or a partially-populated
block with a list of other transactions to fetch (other_transactions).
As a result of the consensus algorithm of some blockchains, blocks
can be omitted (i.e. certain block indexes can be skipped). If a query
for one of these omitted indexes is made, the response should not include
a `Block` object.
It is VERY important to note that blocks MUST still form a canonical,
connected chain of blocks where each block has a unique index. In other words,
the `PartialBlockIdentifier` of a block after an omitted block should
reference the last non-omitted block.
type: object
required:
- block_omitted
properties:
block:
$ref: '#/components/schemas/Block'
block_omitted:
description: |
As a result of the consensus algorithm of some blockchains, blocks
can be omitted (i.e. certain block indexes can be skipped). If a query
for one of these omitted indexes is made, the response should return
`true` for this field.
It is VERY important to note that blocks MUST still form a canonical,
connected chain of blocks where each block has a unique index. In other words,
the `PartialBlockIdentifier` of a block after an omitted block should
reference the last non-omitted block.
type: boolean
other_transactions:
description: |
Some blockchains may require additional transactions to be fetched
Expand Down

0 comments on commit 57b336d

Please sign in to comment.