2021-07-01 13:16:47 -07:00
|
|
|
package rpc
|
|
|
|
|
|
|
|
import (
|
|
|
|
"context"
|
|
|
|
|
2021-07-06 09:18:26 -07:00
|
|
|
"github.com/gagliardetto/solana-go"
|
2021-07-01 13:16:47 -07:00
|
|
|
)
|
|
|
|
|
|
|
|
// GetSlotLeaders returns the slot leaders for a given slot range.
|
|
|
|
func (cl *Client) GetSlotLeaders(
|
|
|
|
ctx context.Context,
|
2021-07-09 08:56:15 -07:00
|
|
|
start uint64,
|
|
|
|
limit uint64,
|
2021-07-01 13:16:47 -07:00
|
|
|
) (out []solana.PublicKey, err error) {
|
|
|
|
params := []interface{}{start, limit}
|
2021-07-20 12:29:06 -07:00
|
|
|
err = cl.rpcClient.CallForInto(ctx, &out, "getSlotLeaders", params)
|
2021-07-01 13:16:47 -07:00
|
|
|
return
|
|
|
|
}
|