Fix RPC/GetSlot
This commit is contained in:
parent
a431f0a26d
commit
7806a230cf
|
@ -86,13 +86,13 @@ func (c *Client) GetRecentBlockhash(ctx context.Context, commitment CommitmentTy
|
|||
}
|
||||
|
||||
// GetSlot returns the current slot the node is processing.
|
||||
func (c *Client) GetSlot(ctx context.Context, commitment CommitmentType) (out GetSlotResult, err error) {
|
||||
func (c *Client) GetSlot(ctx context.Context, commitment CommitmentType) (out bin.Uint64, err error) {
|
||||
var params []interface{}
|
||||
if commitment != "" {
|
||||
params = append(params, string(commitment))
|
||||
params = append(params, M{"commitment": commitment})
|
||||
}
|
||||
|
||||
err = c.rpcClient.CallFor(&out, "getSlot", params...)
|
||||
err = c.rpcClient.CallFor(&out, "getSlot", params)
|
||||
return
|
||||
}
|
||||
|
||||
|
|
|
@ -32,8 +32,6 @@ type GetBalanceResult struct {
|
|||
Value bin.Uint64 `json:"value"`
|
||||
}
|
||||
|
||||
type GetSlotResult bin.Uint64
|
||||
|
||||
type GetRecentBlockhashResult struct {
|
||||
RPCContext
|
||||
Value BlockhashResult `json:"value"`
|
||||
|
|
Loading…
Reference in New Issue