getLeaderSchedule issues
getLeaderSchedule issues
Loading saved threads...
Labhesh Agarwal · External communityPost link
External question — Solana Stack Exchange
Author: Labhesh Agarwal
Original post: https://solana.stackexchange.com/questions/23089
License: CC BY-SA 4.0 — https://creativecommons.org/licenses/by-sa/4.0/
Adaptation: HTML converted to plain text; contact email addresses removed.
I am using @solana/web3.js
Trying to get slots a validator had last epoch (830). The code is giving me slots for current epoch.
const schedule = await this.connection.getLeaderSchedule(epochFirstSlot, {
identity: nodeIdentity
});
epochFirstSlot = 358560000 (Number)
nodeIdentity = Valid node pub identity (String)
Quote
Report
Jon C · External communityPost link
External answer — Solana Stack Exchange
Author: Jon C
Original post: https://solana.stackexchange.com/a/23147
License: CC BY-SA 4.0 — https://creativecommons.org/licenses/by-sa/4.0/
Adaptation: HTML converted to plain text; contact email addresses removed.
In @solana/web3.js, the
getLeaderSchedule
function on the
Connection
class doesn't seem to take any parameters:
https://github.com/solana-foundation/solana-web3.js/blob/c26c13bf841821d9bbf83bb476c567fe29d13821/src/connection.ts#L4520
You might need to just make the request without the library, following some of the curl calls or by switching to kit, as outlined at
https://solana.com/docs/rpc/http/getleaderschedule
Quote
Report
Post Reply
Checking account access…