Skip to content

Commit

Permalink
Revert "feat: add support for getGenesisHash RPC (solana-labs#19732)"
Browse files Browse the repository at this point in the history
This reverts commit 9041ccd.
  • Loading branch information
frits-metalogix committed Nov 24, 2021
1 parent 9224fb3 commit 9162b3d
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 23 deletions.
12 changes: 0 additions & 12 deletions web3.js/src/connection.ts
Expand Up @@ -2963,18 +2963,6 @@ export class Connection {
return res.result;
}

/**
* Fetch the genesis hash
*/
async getGenesisHash(): Promise<string> {
const unsafeRes = await this._rpcRequest('getGenesisHash', []);
const res = create(unsafeRes, jsonRpcResult(string()));
if ('error' in res) {
throw new Error('failed to get genesis hash: ' + res.error.message);
}
return res.result;
}

/**
* Fetch a processed block from the cluster.
*/
Expand Down
11 changes: 0 additions & 11 deletions web3.js/test/connection.test.ts
Expand Up @@ -2668,17 +2668,6 @@ describe('Connection', () => {
expect(version['solana-core']).to.be.ok;
});

it('getGenesisHash', async () => {
await mockRpcResponse({
method: 'getGenesisHash',
params: [],
value: 'GH7ome3EiwEr7tu9JuTh2dpYWBJK3z69Xm1ZE3MEE6JC',
});

const genesisHash = await connection.getGenesisHash();
expect(genesisHash).not.to.be.empty;
});

it('request airdrop', async () => {
const account = Keypair.generate();

Expand Down

0 comments on commit 9162b3d

Please sign in to comment.