Fix RPC/GetSlot

This commit is contained in:
Slavomir 2021-07-01 22:10:11 +02:00
parent a431f0a26d
commit 7806a230cf
2 changed files with 3 additions and 5 deletions

View File

@ -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
}

View File

@ -32,8 +32,6 @@ type GetBalanceResult struct {
Value bin.Uint64 `json:"value"`
}
type GetSlotResult bin.Uint64
type GetRecentBlockhashResult struct {
RPCContext
Value BlockhashResult `json:"value"`