Skip to content

Commit

Permalink
Merge branch 'main' into cis4
Browse files Browse the repository at this point in the history
  • Loading branch information
soerenbf committed Aug 17, 2023
2 parents b2fb7e3 + 8c5e73f commit 1defce6
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 18 deletions.
28 changes: 20 additions & 8 deletions .github/workflows/deployment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,17 @@ jobs:
with:
version: 'latest'

- name: Cache dependencies
id: yarn-cache
uses: actions/cache@v3
with:
path: node_modules
key: ${{ runner.os }}-yarn-${{ hashFiles('yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-${{ hashFiles('yarn.lock') }}
- name: Get dependencies
if: steps.yarn-cache.outputs.cache-hit != 'true'
run: yarn install --immutable

- name: Build release
Expand All @@ -56,12 +66,11 @@ jobs:
with:
name: build-release
path: |
./node_modules/@concordium
./packages/rust-bindings/pkg
./packages/common/lib
./packages/nodejs/lib
./packages/common/grpc
./packages/nodejs/grpc
packages/*/lib
packages/*/grpc
packages/*/package.json
packages/*/README.md
packages/rust-bindings/pkg/*/concordium_rust_bindings*
build-typedoc:
runs-on: ubuntu-22.04
Expand All @@ -81,8 +90,11 @@ jobs:
with:
name: build-release

- name: Get dependencies
run: yarn install --immutable
- name: Restore cached dependencies
uses: actions/cache/restore@v3
with:
path: node_modules
key: ${{ runner.os }}-yarn-${{ hashFiles('yarn.lock') }}

- name: Generate typedoc documentation
run: yarn typedoc
Expand Down
22 changes: 12 additions & 10 deletions packages/common/src/GRPCClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -528,17 +528,19 @@ export class ConcordiumGRPCClient {
}, timeoutTime);
}

const blockStream = this.getFinalizedBlocks(abortController.signal);

const response = await this.getBlockItemStatus(transactionHash);
if (response.status === 'finalized') {
// Simply doing `abortController.abort()` causes an error.
// See: https://github.com/grpc/grpc-node/issues/1652
setTimeout(() => abortController.abort(), 0);
return resolve(response.outcome);
}

try {
const blockStream = this.getFinalizedBlocks(
abortController.signal
);

const response = await this.getBlockItemStatus(transactionHash);
if (response.status === 'finalized') {
// Simply doing `abortController.abort()` causes an error.
// See: https://github.com/grpc/grpc-node/issues/1652
setTimeout(() => abortController.abort(), 0);
return resolve(response.outcome);
}

// eslint-disable-next-line @typescript-eslint/no-unused-vars
for await (const _ of blockStream) {
const response = await this.getBlockItemStatus(
Expand Down

0 comments on commit 1defce6

Please sign in to comment.