Skip to content
This repository has been archived by the owner on Mar 24, 2023. It is now read-only.

Commit

Permalink
Merge pull request #506 from nervosnetwork/cherry-pick-pending-tx-hash
Browse files Browse the repository at this point in the history
(Cherry-Pick)feat: Add rpc `gw_get_pending_tx_hashes`
  • Loading branch information
RetricSu authored Aug 29, 2022
2 parents 6613752 + c8b0f2a commit 3e3d726
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
1 change: 0 additions & 1 deletion .github/workflows/godwoken-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,3 @@ jobs:
MANUAL_BUILD_WEB3_INDEXER=true
WEB3_GIT_URL=https://github.com/${{ github.repository }}
WEB3_GIT_CHECKOUT=${{ github.ref }}
GODWOKEN_PREBUILD_IMAGE_NAME=ghcr.io/nervosnetwork/godwoken-prebuilds:1.4.2-rc2-202207211420
13 changes: 13 additions & 0 deletions packages/api-server/src/methods/modules/gw.ts
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,10 @@ export class Gw {
this.is_request_in_queue.bind(this),
0
);
this.get_pending_tx_hashes = middleware(
this.get_pending_tx_hashes.bind(this),
0
);
}

async ping(args: any[]) {
Expand Down Expand Up @@ -676,6 +680,15 @@ export class Gw {
parseGwRpcError(error);
}
}

async get_pending_tx_hashes(args: any[]) {
try {
const result = await this.readonlyRpc.gw_get_pending_tx_hashes(...args);
return result;
} catch (error) {
parseGwRpcError(error);
}
}
}

function formatHexNumber(
Expand Down

0 comments on commit 3e3d726

Please sign in to comment.