Skip to content

Commit

Permalink
feat: Agave v2 RPC: replace getRecentBlockhash with `getLatestBlock…
Browse files Browse the repository at this point in the history
…hash`
  • Loading branch information
buffalojoec committed Oct 23, 2024
1 parent 950dba5 commit b1112a4
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/connection.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4566,7 +4566,7 @@ export class Connection {
}>
> {
const args = this._buildArgs([], commitment);
const unsafeRes = await this._rpcRequest('getRecentBlockhash', args);
const unsafeRes = await this._rpcRequest('getLatestBlockhash', args);
const res = create(unsafeRes, GetRecentBlockhashAndContextRpcResult);
if ('error' in res) {
throw new SolanaJSONRPCError(res.error, 'failed to get recent blockhash');
Expand Down
2 changes: 1 addition & 1 deletion test/mocks/rpc-http.ts
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ const recentBlockhash = async ({
}

await mockRpcResponse({
method: 'getRecentBlockhash',
method: 'getLatestBlockhash',
params,
value: {
blockhash,
Expand Down

0 comments on commit b1112a4

Please sign in to comment.