Skip to content

Commit 6532f7f

Browse files
committed
solana: make block.height optional
1 parent fee3b08 commit 6532f7f

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

solana/solana-normalization/src/data.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import type {Base58Bytes} from '@subsquid/solana-rpc-data'
33

44
export interface BlockHeader {
55
hash: Base58Bytes
6-
height: number
6+
height?: number
77
slot: number
88
parentSlot: number
99
parentHash: Base58Bytes

solana/solana-normalization/src/mapping.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ export {Journal}
1313
export function mapRpcBlock(slot: number, src: rpc.GetBlock, journal: Journal): Block {
1414
let header: BlockHeader = {
1515
hash: src.blockhash,
16-
height: assertNotNull(src.blockHeight, '.blockHeight is not available'),
16+
height: src.blockHeight ?? undefined,
1717
slot,
1818
parentSlot: src.parentSlot,
1919
parentHash: src.previousBlockhash,

0 commit comments

Comments
 (0)