feat: add index_block_hash to by height result

This commit is contained in:
Zitao Xiong
2022-02-16 21:38:04 +08:00
parent be464aee09
commit 0fa890f627
3 changed files with 18 additions and 0 deletions

View File

@@ -37,6 +37,14 @@
"type": "string",
"description": "Hash representing the block"
},
"index_block_hash": {
"type": "string",
"description": "Hash of the index block"
},
"parent_index_block_hash": {
"type": "string",
"description": "Hash of the parent index block"
},
"parent_block_hash": {
"type": "string",
"description": "Hash of the parent block"

8
docs/generated.d.ts vendored
View File

@@ -1219,6 +1219,14 @@ export interface Block {
* Hash representing the block
*/
hash: string;
/**
* Hash of the index block
*/
index_block_hash?: string;
/**
* Hash of the parent index block
*/
parent_index_block_hash?: string;
/**
* Hash of the parent block
*/

View File

@@ -458,6 +458,8 @@ function parseDbBlock(
canonical: dbBlock.canonical,
height: dbBlock.block_height,
hash: dbBlock.block_hash,
index_block_hash: dbBlock.index_block_hash,
parent_index_block_hash: dbBlock.parent_index_block_hash,
parent_block_hash: dbBlock.parent_block_hash,
burn_block_time: dbBlock.burn_block_time,
burn_block_time_iso: unixEpochToIso(dbBlock.burn_block_time),