fix: getEpochInfo RPC endpoint now includes the current block height

This commit is contained in:
Michael Vines
2020-07-21 14:43:40 -07:00
parent a5dd848702
commit 3b87780f21
4 changed files with 13 additions and 4 deletions

View File

@ -394,13 +394,19 @@ test('get epoch info', async () => {
slotIndex: 1,
slotsInEpoch: 8192,
absoluteSlot: 1,
blockHeight: 1,
},
},
]);
const epochInfo = await connection.getEpochInfo();
for (const key of ['epoch', 'slotIndex', 'slotsInEpoch', 'absoluteSlot']) {
for (const key of [
'epoch',
'slotIndex',
'slotsInEpoch',
'absoluteSlot' /*, 'blockHeight'*/, // Uncomment blockHeight after 1.1.20 ships
]) {
expect(epochInfo).toHaveProperty(key);
expect(epochInfo[key]).toBeGreaterThanOrEqual(0);
}