fix: getEpochInfo RPC endpoint now includes the current block height
This commit is contained in:
@ -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);
|
||||
}
|
||||
|
Reference in New Issue
Block a user