Skip to content

Commit

Permalink
fix(rpc): getVersion type mismatch
Browse files Browse the repository at this point in the history
  • Loading branch information
yihau committed Oct 27, 2021
1 parent e88b6c0 commit e6823ca
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
4 changes: 2 additions & 2 deletions rpc/get_version.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ type GetVersionResponse struct {

// GetVersionResult is a part of raw rpc response of `getVersion`
type GetVersionResult struct {
SolanaCore string `json:"solana-core"`
FeatureSet uint64 `json:"feature-set"`
SolanaCore string `json:"solana-core"`
FeatureSet *uint32 `json:"feature-set"`
}

// GetVersion returns the current solana versions running on the node
Expand Down
4 changes: 3 additions & 1 deletion rpc/get_version_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ package rpc
import (
"context"
"testing"

"github.com/portto/solana-go-sdk/pkg/pointer"
)

func TestGetVersion(t *testing.T) {
Expand All @@ -23,7 +25,7 @@ func TestGetVersion(t *testing.T) {
},
Result: GetVersionResult{
SolanaCore: "1.7.14",
FeatureSet: 1824749018,
FeatureSet: pointer.Uint32(1824749018),
},
},
ExpectedError: nil,
Expand Down

0 comments on commit e6823ca

Please sign in to comment.