fix: getAccountInfo handle not found account - #473
Conversation
Greptile SummaryThe PR aligns GetAccountInfo with Solana RPC null-value semantics and updates internal consumers to handle missing accounts explicitly. The functional nil-account fix is complete, but the replacement commit remains unsigned.
Confidence Score: 4/5The PR should not merge until its sole current commit is signed and verified. The account-not-found handling now protects the previously affected callers, but replacing the earlier unsigned commit with another unsigned commit leaves the repository's verified-commit requirement unsatisfied. Files Needing Attention: The PR commit metadata for f621e61 requires attention. Important Files Changed
Reviews (4): Last reviewed commit: "fix: getAccountInfo handle not found acc..." | Re-trigger Greptile |
| @@ -100,7 +106,7 @@ func (cl *Client) GetAccountInfoWithOpts( | |||
| return nil, err | |||
| } | |||
| if out == nil || out.Value == nil { | |||
| @@ -100,7 +106,7 @@ func (cl *Client) GetAccountInfoWithOpts( | |||
| return nil, err | |||
| } | |||
| if out == nil || out.Value == nil { | |||
There was a problem hiding this comment.
Commit lacks verified signature
Commit 4436687da9752fa937a68662a6ca8996cb6266de has no verifiable signature, so this pull request does not satisfy the repository requirement that commits be signed and verified.
Context Used: Request changes if the commits are not signed (ver... (source)
a96347c to
d786444
Compare
Signed-off-by: Lunor <ntluandev999@gmail.com>
d786444 to
f621e61
Compare
| return nil, err | ||
| } | ||
| if out == nil || out.Value == nil { | ||
| return nil, ErrNotFound | ||
| return out, nil |
There was a problem hiding this comment.
Replacement commit remains unsigned
The sole commit in the current pull-request range has no signature, so the pull request still violates the repository requirement that every commit be signed and verified and cannot be merged in its current form.
Context Used: Request changes if the commits are not signed (ver... (source)
koriyoshi2041
left a comment
There was a problem hiding this comment.
Reviewed at f621e616. Returning the RPC envelope preserves the response context for a protocol-level value: null, while the decoding helpers and CLI/address-table consumers retain explicit not-found handling instead of dereferencing the nil value.
Local verification passed:
go test ./rpc/... ./programs/address-lookup-table/... ./cmd/slnc/cmd/... -count=1
git diff --check origin/main...HEAD
The code change looks good at this head. The remaining merge gate is repository policy: the replacement commit is still not GitHub-verified, and CONTRIBUTING requires verified signatures.
|
@koriyoshi2041 Hello. Hope you have a nice day. I try to force push for add verified signatures. And in this PR have only 1 commit with verified |
|
Confirmed: GitHub now reports commit |

Fix: align GetAccountInfo with Solana RPC specification for non-existent accounts
Summary
Per the Solana JSON-RPC Specification for getAccountInfo, when an account does not exist on-chain, the node returns
with no RPC error.
Previously,
GetAccountInfoWithOptsinterceptedout.Value == niland returnednil, ErrNotFound. This PR updatesGetAccountInfoWithOptsto return(out, nil) (where out.Value == nil), matching standard Solana RPC behavior.Test
go test ./rpc -v -run "TestClient_GetAccount.*"go vet .