feat: add minimumLedgerSlot api

This commit is contained in:
Justin Starry
2020-05-21 16:58:17 +08:00
committed by Michael Vines
parent 839e93480c
commit 6558e05fd0
4 changed files with 47 additions and 0 deletions

View File

@ -1089,6 +1089,25 @@ test('get block time', async () => {
}
});
test('get minimum ledger slot', async () => {
const connection = new Connection(url);
mockRpc.push([
url,
{
method: 'minimumLedgerSlot',
params: [],
},
{
error: null,
result: 0,
},
]);
const minimumLedgerSlot = await connection.getMinimumLedgerSlot();
expect(minimumLedgerSlot).toBeGreaterThanOrEqual(0);
});
test('getVersion', async () => {
const connection = new Connection(url);