Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/nasty-days-wash.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@solana/rpc-api': minor
---

Add clientId field to getClusterNodes response
1 change: 1 addition & 0 deletions packages/rpc-api/src/__tests__/get-cluster-nodes-test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ describe('getClusterNodes', () => {
const [featureSet, gossip, pubkey, rpc, shredVersion, version] = await getNodeInfoFromLogFile();
const res = await mockRpc.getClusterNodes().send();
expect(res[0]).toStrictEqual({
clientId: expect.any(Number),
featureSet,
gossip,
pubkey,
Expand Down
2 changes: 2 additions & 0 deletions packages/rpc-api/src/getClusterNodes.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
import { Address } from '@solana/addresses';

type ClusterNode = Readonly<{
/** The Client Id of the node, or `null` if the Client Id is not available */
clientId: number | null;
/**
* The unique identifier of the node's feature set.
*
Expand Down
1 change: 1 addition & 0 deletions packages/rpc-api/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -292,6 +292,7 @@ function getAllowedNumericKeypaths(): AllowedNumericKeypaths<RpcApi<SolanaRpcApi
['rewards', KEYPATH_WILDCARD, 'commission'],
],
getClusterNodes: [
[KEYPATH_WILDCARD, 'clientId'],
[KEYPATH_WILDCARD, 'featureSet'],
[KEYPATH_WILDCARD, 'shredVersion'],
],
Expand Down
Loading