fix: use stable endpoints for getBlocks (#20310)
This commit is contained in:
@@ -3119,7 +3119,7 @@ export class Connection {
|
||||
endSlot !== undefined ? [startSlot, endSlot] : [startSlot],
|
||||
commitment,
|
||||
);
|
||||
const unsafeRes = await this._rpcRequest('getBlocks', args);
|
||||
const unsafeRes = await this._rpcRequest('getConfirmedBlocks', args);
|
||||
const res = create(unsafeRes, jsonRpcResult(array(number())));
|
||||
if ('error' in res) {
|
||||
throw new Error('failed to get blocks: ' + res.error.message);
|
||||
|
Reference in New Issue
Block a user