Skip to content

Commit e6823ca

Browse files
committed
fix(rpc): getVersion type mismatch
1 parent e88b6c0 commit e6823ca

2 files changed

Lines changed: 5 additions & 3 deletions

File tree

rpc/get_version.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ type GetVersionResponse struct {
1010

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

1717
// GetVersion returns the current solana versions running on the node

rpc/get_version_test.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@ package rpc
33
import (
44
"context"
55
"testing"
6+
7+
"github.com/portto/solana-go-sdk/pkg/pointer"
68
)
79

810
func TestGetVersion(t *testing.T) {
@@ -23,7 +25,7 @@ func TestGetVersion(t *testing.T) {
2325
},
2426
Result: GetVersionResult{
2527
SolanaCore: "1.7.14",
26-
FeatureSet: 1824749018,
28+
FeatureSet: pointer.Uint32(1824749018),
2729
},
2830
},
2931
ExpectedError: nil,

0 commit comments

Comments
 (0)