Skip to content

Commit

Permalink
Merge pull request #35 from coinbase/patrick/block-missing
Browse files Browse the repository at this point in the history
Support Omitted Blocks
  • Loading branch information
patrick-ogrady authored Aug 9, 2020
2 parents b8f7359 + 57b336d commit 9036614
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 6 deletions.
5 changes: 1 addition & 4 deletions api.json
Original file line number Diff line number Diff line change
Expand Up @@ -1343,11 +1343,8 @@
}
},
"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"
],
"properties": {
"block": {
"$ref":"#/components/schemas/Block"
Expand Down
12 changes: 10 additions & 2 deletions api.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -700,9 +700,17 @@ 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
properties:
block:
$ref: '#/components/schemas/Block'
Expand Down

0 comments on commit 9036614

Please sign in to comment.