feat: add support for getGenesisHash RPC (#19732)

This commit is contained in:
Justin Starry
2021-09-09 13:34:43 -04:00
committed by GitHub
parent df5befdaca
commit 0b64bf5585
2 changed files with 23 additions and 0 deletions

View File

@ -2668,6 +2668,17 @@ 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();