Skip to content

Commit

Permalink
ensure node supports daCompressedBlock query
Browse files Browse the repository at this point in the history
  • Loading branch information
Torres-ssf committed Jan 20, 2025
1 parent 23d82c4 commit f0649fd
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions packages/account/src/providers/provider.ts
Original file line number Diff line number Diff line change
@@ -1739,6 +1739,14 @@ export default class Provider {
}

async daCompressedBlock(height: string) {
if (!this.features.daCompressedBlock) {
const { nodeVersion } = await this.getNode();
throw new FuelError(
ErrorCode.NOT_SUPPORTED,
`The query "daCompressedBlock" is not supported by node version: ${nodeVersion}`
);
}

const { daCompressedBlock } = await this.operations.daCompressedBlock({
height,
});

0 comments on commit f0649fd

Please sign in to comment.